Skip to content

Commit

Permalink
UPBGE: Fix mesh polygon count.
Browse files Browse the repository at this point in the history
The number of polygons was based on number of triangle
indices but wasn't divided by 3.

Fix issue #893.
  • Loading branch information
panzergame committed Oct 17, 2018
1 parent 263b6a8 commit 8c8b8db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/gameengine/Rasterizer/RAS_Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void RAS_Mesh::EndConversion(RAS_BoundingBoxManager *boundingBoxManager)
startIndex += indexCount;
}

m_numPolygons = startIndex;
m_numPolygons = startIndex / 3;
}

const RAS_Mesh::LayersInfo& RAS_Mesh::GetLayersInfo() const
Expand Down

0 comments on commit 8c8b8db

Please sign in to comment.