]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/modellib.cxx
Merge branch 'next' of git.gitorious.org:fg/simgear into next
[simgear.git] / simgear / scene / model / modellib.cxx
index ae90f1a46b6d6d4033c636fcacbbdec04c45adf7..886825f89325b60d4fd677cddeccb4d53c53a6bb 100644 (file)
@@ -46,22 +46,19 @@ using namespace simgear;
 osgDB::RegisterReaderWriterProxy<SGReaderWriterXML> g_readerWriter_XML_Proxy;
 ModelRegistryCallbackProxy<LoadOnlyCallback> g_xmlCallbackProxy("xml");
 
-\fSGPropertyNode_ptr SGModelLib::static_propRoot;
+SGPropertyNode_ptr SGModelLib::static_propRoot;
 SGModelLib::panel_func SGModelLib::static_panelFunc = NULL;
 
 ////////////////////////////////////////////////////////////////////////
 // Implementation of SGModelLib.
 ////////////////////////////////////////////////////////////////////////
-void SGModelLib::init(const string &root_dir)
+void SGModelLib::init(const string &root_dir, SGPropertyNode* root)
 {
     osgDB::Registry::instance()->getDataFilePathList().push_front(root_dir);
+    static_propRoot = root;
+    SGPagedLOD::setRenderingCache(root->getBoolValue("/sim/rendering/cache",true));
 }
 
-void SGModelLib::setPropRoot(SGPropertyNode* root)
-{
-  static_propRoot = root;
-}
-    
 void SGModelLib::setPanelFunc(panel_func pf)
 {
   static_panelFunc = pf;