]> git.mxchange.org Git - flightgear.git/commitdiff
Improve OSG caching.
authorThorstenB <brehmt@gmail.com>
Sun, 3 Apr 2011 17:13:51 +0000 (19:13 +0200)
committerThorstenB <brehmt@gmail.com>
Sun, 3 Apr 2011 17:13:51 +0000 (19:13 +0200)
Ensure property tree is provided early to modellib.
To disable: --prop:sim/rendering/cache=0 (enabled by default)
(also requires simgear update)

src/Main/fgviewer.cxx
src/Main/main.cxx

index 428bc2c328e24312261ba6d977ae89376a7b6f28..6568368050c2f5a9b94128e1b048bfaa571e3a0c 100644 (file)
@@ -204,7 +204,7 @@ fgviewerMain(int argc, char** argv)
     }
 
     globals->set_matlib( new SGMaterialLib );
-    simgear::SGModelLib::init(globals->get_fg_root());
+    simgear::SGModelLib::init(globals->get_fg_root(), globals->get_props());
 
     // Initialize the material property subsystem.
 
index 33bb062bbe081950e78252babb3120cfcf214111..6c7b8a7e1ce962164d18729ac02f0fee39daaaeb 100644 (file)
@@ -390,8 +390,7 @@ static void fgIdleFunction ( void ) {
         // Initialize the material manager
         ////////////////////////////////////////////////////////////////////
         globals->set_matlib( new SGMaterialLib );
-        simgear::SGModelLib::init(globals->get_fg_root());
-        simgear::SGModelLib::setPropRoot(globals->get_props());
+        simgear::SGModelLib::init(globals->get_fg_root(), globals->get_props());
         simgear::SGModelLib::setPanelFunc(load_panel);
         
         ////////////////////////////////////////////////////////////////////