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-29 21:09:20 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-05-29 21:09:20 +0400
commitf5b3a00fbb89c4dc341f399add18ccd06a5b2759 (patch)
tree2fedb9d45a6b54074f56239cf8e1e855504bf841
parentd5b27fabcc4f8289b9315248a16a22f7045d9363 (diff)
BGE: small performance problem: object set invisible at startup were still put in the DBVT, causing unnecessary culling.
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index d9e93d41f34..385301b1105 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1338,8 +1338,9 @@ void BL_CreateGraphicObjectNew(KX_GameObject* gameobj,
ctrl->setNewClientInfo(gameobj->getClientInfo());
ctrl->setLocalAabb(localAabbMin, localAabbMax);
if (isActive) {
- // add first, this will create the proxy handle
- env->addCcdGraphicController(ctrl);
+ // add first, this will create the proxy handle, only if the object is visible
+ if (gameobj->GetVisible())
+ env->addCcdGraphicController(ctrl);
// update the mesh if there is a deformer, this will also update the bounding box for modifiers
RAS_Deformer* deformer = gameobj->GetDeformer();
if (deformer)