diff --git a/assets.d b/assets.d index 921ed79..aa8c3af 100644 --- a/assets.d +++ b/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; } }