From 82f6d29f9f3d237a83fd396a1f95308555aea513 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 3 Apr 2011 19:13:51 +0200 Subject: [PATCH] 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) --- src/Main/fgviewer.cxx | 2 +- src/Main/main.cxx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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); //////////////////////////////////////////////////////////////////// -- 2.39.5