Utility/Mesh: Refactor Mesh & Submeshes

This commit is contained in:
Jérôme Leclercq
2018-05-03 13:32:17 +02:00
parent 03e976993f
commit d94baf133b
15 changed files with 250 additions and 224 deletions

View File

@@ -279,10 +279,7 @@ bool Load(Mesh* mesh, Stream& stream, const MeshParams& parameters)
vertexMapper.Unmap();
// Submesh
StaticMeshRef subMesh = StaticMesh::New(mesh);
subMesh->Create(vertexBuffer);
subMesh->SetIndexBuffer(indexBuffer);
StaticMeshRef subMesh = StaticMesh::New(vertexBuffer, indexBuffer);
subMesh->GenerateAABB();
subMesh->SetMaterialIndex(iMesh->mMaterialIndex);