Skip to content

Commit

Permalink
UPBGE: Fix alpha sort with modifier.
Browse files Browse the repository at this point in the history
Modifier deformer doesn't create a RAS_DisplayArray which mean that we can't
sort polygons with a modifier mesh.
  • Loading branch information
panzergame committed Apr 28, 2016
1 parent 430386b commit 045ef96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/gameengine/Rasterizer/RAS_MeshObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,11 @@ void RAS_MeshObject::SortPolygons(RAS_MeshSlot *ms, const MT_Transform &transfor

RAS_DisplayArray *array = ms->GetDisplayArray();

// If there's no vertex array it means that the we're using modifier deformer.
if (!array) {
return;
}

unsigned int nvert = 3;
unsigned int totpoly = array->m_index.size() / nvert;

Expand Down

0 comments on commit 045ef96

Please sign in to comment.