]> git.mxchange.org Git - flightgear.git/commitdiff
Merge branch 'timoore/optimization' into next
authorTim Moore <timoore33@gmail.com>
Fri, 3 Aug 2012 18:20:01 +0000 (20:20 +0200)
committerTim Moore <timoore33@gmail.com>
Fri, 3 Aug 2012 18:20:01 +0000 (20:20 +0200)
src/Viewer/renderer.cxx

index 3def71336b3398085438a61a441f8381cef9f1a2..5b61ffaaee1bf55fd61db819e3e83fba5c363dcd 100644 (file)
@@ -74,6 +74,7 @@
 #include <simgear/scene/model/animation.hxx>
 #include <simgear/scene/model/placement.hxx>
 #include <simgear/scene/sky/sky.hxx>
+#include <simgear/scene/util/DeletionManager.hxx>
 #include <simgear/scene/util/SGUpdateVisitor.hxx>
 #include <simgear/scene/util/RenderConstants.hxx>
 #include <simgear/scene/util/SGSceneUserData.hxx>
@@ -1506,7 +1507,9 @@ FGRenderer::setupView( void )
     stateSet = mRealRoot->getOrCreateStateSet();
     stateSet->setAttributeAndModes(new osg::Program, osg::StateAttribute::ON);
 
-       mDeferredRealRoot->addChild( mRealRoot.get() );
+    mDeferredRealRoot->addChild( mRealRoot.get() );
+
+    DeletionManager::install(mRealRoot.get());
 }
                                     
 // Update all Visuals (redraws anything graphics related)