Skip to content

Commit

Permalink
UPBGE: Fix crash with frustum culling disabled
Browse files Browse the repository at this point in the history
Objects returned by CalculateVisibleMeshes must be "renderable"

It is fixing: #1468
  • Loading branch information
youle31 committed May 5, 2021
1 parent 298362f commit 7306751
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/gameengine/Ketsji/KX_Scene.cpp
Expand Up @@ -1113,6 +1113,9 @@ std::vector<KX_GameObject *> KX_Scene::CalculateVisibleMeshes(KX_Camera *cam, RA
std::vector<KX_GameObject *> objects;
if (!cam->GetFrustumCulling()) {
for (KX_GameObject *gameobj : m_objectlist) {
if (!gameobj->Renderable(layer)) {
continue;
}
gameobj->GetCullingNode().SetCulled(false);
objects.push_back(gameobj);
}
Expand Down

0 comments on commit 7306751

Please sign in to comment.