]> git.mxchange.org Git - flightgear.git/commitdiff
use DeletionManager
authorTim Moore <timoore33@gmail.com>
Fri, 3 Aug 2012 15:16:18 +0000 (17:16 +0200)
committerTim Moore <timoore33@gmail.com>
Fri, 3 Aug 2012 18:18:11 +0000 (20:18 +0200)
src/Viewer/renderer.cxx

index 0176b37689785f5712f24d9e3b691e42ca37fe8b..b7d930483dbd1ef7a4968915e3eeac749127148a 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>
@@ -1503,7 +1504,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)