Skip to content

Commit

Permalink
Fixed mesh load with no indices
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardodoria committed Mar 10, 2023
1 parent acf0e87 commit e9670aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/core/subsystem/RenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ bool RenderSystem::loadMesh(MeshComponent& mesh){
buffers["vertices"] = &mesh.buffer;
allBuffersEmpty = false;
}
if (mesh.buffer.getSize() > 0){
if (mesh.indices.getSize() > 0){
buffers["indices"] = &mesh.indices;
allBuffersEmpty = false;
}
Expand All @@ -505,7 +505,7 @@ bool RenderSystem::loadMesh(MeshComponent& mesh){
}

if (mesh.vertexCount == 0){
mesh.vertexCount = mesh.buffer.getSize();
mesh.vertexCount = mesh.buffer.getCount();
}

if (allBuffersEmpty)
Expand Down

0 comments on commit e9670aa

Please sign in to comment.