diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-02 00:34:23 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-02 00:34:23 +0400 |
commit | 07abb9dee2aba5ed161c22f3ec45031f9fdb183a (patch) | |
tree | 83740cfff96b12a6240d1e5ceee5f1594e43c984 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | e13a089d918cbe3709f544ccebbb718a452ac6fa (diff) |
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.
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index fa95a89135b..22b9c940178 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -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); } |