#include <simgear/scene/material/Effect.hxx>
#include <simgear/scene/model/particles.hxx>
#include <simgear/scene/tsync/terrasync.hxx>
+#include <simgear/scene/tgdb/userdata.hxx>
#include <simgear/package/Root.hxx>
#include <simgear/package/Package.hxx>
fgSetBool("/sim/startup/stdout-to-terminal", isatty(1) != 0 );
fgSetBool("/sim/startup/stderr-to-terminal", isatty(2) != 0 );
+
+ sgUserDataInit( globals->get_props() );
+
return true;
}
render->getViewer()->getDatabasePager()->clear();
osgDB::Registry::instance()->clearObjectCache();
-
+ // Pager requests depend on this, so don't clear it until now
+ sgUserDataInit( NULL );
+
// preserve the event handler; re-creating it would entail fixing the
// idle handler
osg::ref_ptr<flightgear::FGEventHandler> eventHandler = render->getEventHandler();
render->init();
render->setViewer(viewer.get());
+ sgUserDataInit( globals->get_props() );
+
viewer->getDatabasePager()->setUpThreads(1, 1);
// must do this before splashinit for Rembrandt
particles_branch->setName("Particles");
scene_graph->addChild(particles_branch.get());
simgear::GlobalParticleCallback::setSwitch(fgGetNode("/sim/rendering/particles", true));
-
- // Initials values needed by the draw-time object loader
- sgUserDataInit( globals->get_props() );
_listener = new ScenerySwitchListener(this);
}
void FGScenery::shutdown()
{
- sgUserDataInit( NULL );
-
scene_graph = NULL;
terrain_branch = NULL;
models_branch = NULL;