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

@@ -158,12 +158,7 @@ namespace Nz
#endif
VertexBufferRef vertexBuffer = VertexBuffer::New(parameters.vertexDeclaration, header.num_vertices, parameters.storage, parameters.vertexBufferFlags);
StaticMeshRef subMesh = StaticMesh::New(mesh);
if (!subMesh->Create(vertexBuffer))
{
NazaraError("Failed to create SubMesh");
return false;
}
StaticMeshRef subMesh = StaticMesh::New(vertexBuffer, indexBuffer);
// Extracting vertices
stream.SetCursorPos(header.offset_frames);