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 authored and youle31 committed May 26, 2019
1 parent 014bb4c commit 80827a5
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 80827a5

Please sign in to comment.