Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-05-02 00:34:23 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-05-02 00:34:23 +0400
commit07abb9dee2aba5ed161c22f3ec45031f9fdb183a (patch)
tree83740cfff96b12a6240d1e5ceee5f1594e43c984 /source/gameengine/Ketsji/KX_GameObject.cpp
parente13a089d918cbe3709f544ccebbb718a452ac6fa (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.cpp2
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);
}