From: ThorstenB Date: Sun, 3 Apr 2011 17:13:51 +0000 (+0200) Subject: Improve OSG caching. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=82f6d29f9f3d237a83fd396a1f95308555aea513;p=flightgear.git Improve OSG caching. Ensure property tree is provided early to modellib. To disable: --prop:sim/rendering/cache=0 (enabled by default) (also requires simgear update) --- diff --git a/src/Main/fgviewer.cxx b/src/Main/fgviewer.cxx index 428bc2c32..656836805 100644 --- a/src/Main/fgviewer.cxx +++ b/src/Main/fgviewer.cxx @@ -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. diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 33bb062bb..6c7b8a7e1 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -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); ////////////////////////////////////////////////////////////////////