From acaf611495bf3a22ce46db4e7c99a6070c29edcb Mon Sep 17 00:00:00 2001 From: timoore Date: Sun, 29 Jul 2007 22:34:15 +0000 Subject: [PATCH] Load BTG files through the osgDB::Registry This is part of changes leading towards using the OSG database pager thread. --- src/Scenery/tileentry.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Scenery/tileentry.cxx b/src/Scenery/tileentry.cxx index 2d7e44f2e..1b19ba680 100644 --- a/src/Scenery/tileentry.cxx +++ b/src/Scenery/tileentry.cxx @@ -40,6 +40,8 @@ #include #include +#include + #include #include #include @@ -50,6 +52,7 @@ #include #include #include +#include #include #include @@ -215,7 +218,12 @@ bool FGTileEntry::obj_load( const string& path, fgGetBool("/sim/rendering/random-objects", true); // try loading binary format - osg::Node* node = SGLoadBTG(path, globals->get_matlib(), is_base, use_random_objects); + osg::ref_ptr options + = new SGReaderWriterBTGOptions(); + options->setMatlib(globals->get_matlib()); + options->setCalcLights(is_base); + options->setUseRandomObjects(use_random_objects); + osg::Node* node = osgDB::readNodeFile(path, options.get()); if (node) geometry->addChild(node);