Merge remote-tracking branch 'origin/main' into SP3-4-editor_fix

This commit is contained in:
Sri Sham Haran 2022-09-28 10:14:20 +08:00
commit ac70758341
1 changed files with 12 additions and 9 deletions

View File

@ -42,15 +42,18 @@ namespace Sandbox
std::vector<Handle<SHMesh>> handles; std::vector<Handle<SHMesh>> handles;
for (auto const& mesh : meshes) for (auto const& mesh : meshes)
{ {
handles.push_back(graphicsSystem->AddMesh( if (mesh.meshName == "Cube.012")
mesh.header.vertexCount, {
mesh.vertexPosition.data(), handles.push_back(graphicsSystem->AddMesh(
mesh.texCoords.data(), mesh.header.vertexCount,
mesh.vertexTangent.data(), mesh.vertexPosition.data(),
mesh.vertexNormal.data(), mesh.texCoords.data(),
mesh.header.indexCount, mesh.vertexTangent.data(),
mesh.indices.data() mesh.vertexNormal.data(),
)); mesh.header.indexCount,
mesh.indices.data()
));
}
} }
graphicsSystem->BuildMeshBuffers(); graphicsSystem->BuildMeshBuffers();