add start and length to mesh parts
This commit is contained in:
parent
e6d66ee5ab
commit
4d54444fa1
7
assets.d
7
assets.d
@ -82,7 +82,6 @@ struct Material
|
||||
{
|
||||
u32 pipeline_id;
|
||||
MaterialMap[MMI.max] maps;
|
||||
Vec4 params;
|
||||
}
|
||||
|
||||
struct Vertex
|
||||
@ -98,6 +97,8 @@ struct Mesh
|
||||
{
|
||||
Vertex[] vtx;
|
||||
u32[] idx;
|
||||
u64 start;
|
||||
u64 length;
|
||||
u32 mat_id;
|
||||
}
|
||||
|
||||
@ -723,7 +724,9 @@ AddMeshVertices(cgltf_accessor* accessor, Model* model, u64 mesh_index, u64* vtx
|
||||
{
|
||||
if(model.meshes[mesh_index].vtx == null)
|
||||
{
|
||||
model.meshes[mesh_index].vtx = model.vtx_buf[*vtx_count .. *vtx_count+accessor.count];
|
||||
model.meshes[mesh_index].vtx = model.vtx_buf[*vtx_count .. *vtx_count+accessor.count];
|
||||
model.meshes[mesh_index].start = *vtx_count;
|
||||
model.meshes[mesh_index].length = accessor.count;
|
||||
*vtx_count += accessor.count;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user