BGE performance:
- Vast performance increase when removing scene containing large number of objects: the sensor/controller map was updated for each deleted object, causing massive slow down when the number of objects was large (O(n^2)). - Use reference when scanning the sensor map => avoid useless copy. - Remove dynamically the object bounding box from the DBVT when the object is invisible => faster culling.
This commit is contained in:
@@ -628,6 +628,8 @@ KX_GameObject::SetVisible(
|
||||
{
|
||||
if (GetSGNode()) {
|
||||
m_bVisible = v;
|
||||
if (m_pGraphicController)
|
||||
m_pGraphicController->Activate(m_bVisible);
|
||||
if (recursive)
|
||||
setVisible_recursive(GetSGNode(), v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user