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:
Benoit Bolsee
2009-05-01 20:34:23 +00:00
parent e13a089d91
commit 07abb9dee2
5 changed files with 32 additions and 13 deletions

View File

@@ -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);
}