From 11fd888ed8b742aa48c8f09bcd692a3591636989 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Sun, 4 Mar 2012 07:07:42 +0100 Subject: [PATCH] Replace osgDB::ReaderWriter::Options to osgDB::Options. This has changed in osg, so reflect that here. --- simgear/scene/material/mat.cxx | 2 +- simgear/scene/material/mat.hxx | 2 +- simgear/scene/material/matlib.cxx | 6 +++--- simgear/scene/model/ModelRegistry.cxx | 22 ++++++++++---------- simgear/scene/model/ModelRegistry.hxx | 22 ++++++++++---------- simgear/scene/model/SGMaterialAnimation.cxx | 2 +- simgear/scene/model/SGMaterialAnimation.hxx | 2 +- simgear/scene/model/SGReaderWriterXML.cxx | 6 +++--- simgear/scene/model/SGReaderWriterXML.hxx | 2 +- simgear/scene/model/SGText.cxx | 2 +- simgear/scene/model/SGText.hxx | 2 +- simgear/scene/model/animation.cxx | 2 +- simgear/scene/model/animation.hxx | 4 ++-- simgear/scene/model/model.cxx | 2 +- simgear/scene/model/model.hxx | 8 +++---- simgear/scene/model/modellib.cxx | 10 ++++----- simgear/scene/model/modellib.hxx | 2 +- simgear/scene/model/particles.cxx | 2 +- simgear/scene/model/particles.hxx | 2 +- simgear/scene/model/shadanim.cxx | 2 +- simgear/scene/sky/cloud.cxx | 2 +- simgear/scene/sky/moon.cxx | 2 +- simgear/scene/sky/newcloud.cxx | 2 +- simgear/scene/sky/oursun.cxx | 2 +- simgear/scene/tgdb/ReaderWriterSTG.cxx | 2 +- simgear/scene/tgdb/ReaderWriterSTG.hxx | 2 +- simgear/scene/tgdb/SGReaderWriterBTG.cxx | 2 +- simgear/scene/tgdb/SGReaderWriterBTG.hxx | 2 +- simgear/scene/tgdb/TileEntry.cxx | 4 ++-- simgear/scene/tgdb/TileEntry.hxx | 4 ++-- simgear/scene/util/PathOptions.cxx | 6 +++--- simgear/scene/util/PathOptions.hxx | 2 +- simgear/scene/util/SGReaderWriterOptions.hxx | 6 +++--- 33 files changed, 71 insertions(+), 71 deletions(-) diff --git a/simgear/scene/material/mat.cxx b/simgear/scene/material/mat.cxx index cf68c2d6..51b8bbe5 100644 --- a/simgear/scene/material/mat.cxx +++ b/simgear/scene/material/mat.cxx @@ -96,7 +96,7 @@ SGMaterial::SGMaterial( const SGReaderWriterOptions* options, buildEffectProperties(options); } -SGMaterial::SGMaterial( const osgDB::ReaderWriter::Options* options, +SGMaterial::SGMaterial( const osgDB::Options* options, const SGPropertyNode *props, SGPropertyNode *prop_root) { diff --git a/simgear/scene/material/mat.hxx b/simgear/scene/material/mat.hxx index c3b7b3c3..292df681 100644 --- a/simgear/scene/material/mat.hxx +++ b/simgear/scene/material/mat.hxx @@ -89,7 +89,7 @@ public: * state information for the material. This node is usually * loaded from the $FG_ROOT/materials.xml file. */ - SGMaterial( const osgDB::ReaderWriter::Options*, + SGMaterial( const osgDB::Options*, const SGPropertyNode *props, SGPropertyNode *prop_root); diff --git a/simgear/scene/material/matlib.cxx b/simgear/scene/material/matlib.cxx index e69fd60d..82214725 100644 --- a/simgear/scene/material/matlib.cxx +++ b/simgear/scene/material/matlib.cxx @@ -67,9 +67,9 @@ bool SGMaterialLib::load( const string &fg_root, const string& mpath, << ex.getMessage() ); throw; } - osg::ref_ptr options - = new osgDB::ReaderWriter::Options; - options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL); + osg::ref_ptr options + = new osgDB::Options; + options->setObjectCacheHint(osgDB::Options::CACHE_ALL); options->setDatabasePath(fg_root); int nMaterials = materials.nChildren(); for (int i = 0; i < nMaterials; i++) { diff --git a/simgear/scene/model/ModelRegistry.cxx b/simgear/scene/model/ModelRegistry.cxx index 273eb493..f1199f68 100644 --- a/simgear/scene/model/ModelRegistry.cxx +++ b/simgear/scene/model/ModelRegistry.cxx @@ -193,7 +193,7 @@ public: } // namespace Node* DefaultProcessPolicy::process(Node* node, const string& filename, - const ReaderWriter::Options* opt) + const Options* opt) { TextureNameVisitor nameVisitor; node->accept(nameVisitor); @@ -202,7 +202,7 @@ Node* DefaultProcessPolicy::process(Node* node, const string& filename, ReaderWriter::ReadResult ModelRegistry::readImage(const string& fileName, - const ReaderWriter::Options* opt) + const Options* opt) { CallbackMap::iterator iter = imageCallbackMap.find(getFileExtension(fileName)); @@ -300,7 +300,7 @@ ModelRegistry::readImage(const string& fileName, osg::Node* DefaultCachePolicy::find(const string& fileName, - const ReaderWriter::Options* opt) + const Options* opt) { Registry* registry = Registry::instance(); osg::Node* cached @@ -342,7 +342,7 @@ OptimizeModelPolicy::OptimizeModelPolicy(const string& extension) : osg::Node* OptimizeModelPolicy::optimize(osg::Node* node, const string& fileName, - const osgDB::ReaderWriter::Options* opt) + const osgDB::Options* opt) { osgUtil::Optimizer optimizer; optimizer.optimize(node, _osgOptions); @@ -358,7 +358,7 @@ osg::Node* OptimizeModelPolicy::optimize(osg::Node* node, } string OSGSubstitutePolicy::substitute(const string& name, - const ReaderWriter::Options* opt) + const Options* opt) { string fileSansExtension = getNameLessExtension(name); string osgFileName = fileSansExtension + ".osg"; @@ -413,7 +413,7 @@ ModelRegistry::addNodeCallbackForExtension(const string& extension, ReaderWriter::ReadResult ModelRegistry::readNode(const string& fileName, - const ReaderWriter::Options* opt) + const Options* opt) { ReaderWriter::ReadResult res; CallbackMap::iterator iter @@ -436,10 +436,10 @@ public: Referenced::setThreadSafeReferenceCounting(true); Registry* registry = Registry::instance(); - ReaderWriter::Options* options = new ReaderWriter::Options; - int cacheOptions = ReaderWriter::Options::CACHE_ALL; + Options* options = new Options; + int cacheOptions = Options::CACHE_ALL; options-> - setObjectCacheHint((ReaderWriter::Options::CacheHintOptions)cacheOptions); + setObjectCacheHint((Options::CacheHintOptions)cacheOptions); registry->setOptions(options); registry->getOrCreateSharedStateManager()-> setShareMode(SharedStateManager::SHARE_STATESETS); @@ -457,7 +457,7 @@ struct ACOptimizePolicy : public OptimizeModelPolicy { _osgOptions &= ~Optimizer::TRISTRIP_GEOMETRY; } Node* optimize(Node* node, const string& fileName, - const ReaderWriter::Options* opt) + const Options* opt) { ref_ptr optimized = OptimizeModelPolicy::optimize(node, fileName, opt); @@ -484,7 +484,7 @@ struct ACOptimizePolicy : public OptimizeModelPolicy { struct ACProcessPolicy { ACProcessPolicy(const string& extension) {} Node* process(Node* node, const string& filename, - const ReaderWriter::Options* opt) + const Options* opt) { Matrix m(1, 0, 0, 0, 0, 0, 1, 0, diff --git a/simgear/scene/model/ModelRegistry.hxx b/simgear/scene/model/ModelRegistry.hxx index e048f187..24e78eb2 100644 --- a/simgear/scene/model/ModelRegistry.hxx +++ b/simgear/scene/model/ModelRegistry.hxx @@ -70,7 +70,7 @@ public: } virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* opt) + const osgDB::Options* opt) { using namespace osg; using namespace osgDB; @@ -103,7 +103,7 @@ public: protected: static osgDB::ReaderWriter::ReadResult loadUsingReaderWriter(const std::string& fileName, - const osgDB::ReaderWriter::Options* opt) + const osgDB::Options* opt) { using namespace osgDB; ReaderWriter* rw = Registry::instance() @@ -126,20 +126,20 @@ protected: struct DefaultProcessPolicy { DefaultProcessPolicy(const std::string& extension) {} osg::Node* process(osg::Node* node, const std::string& filename, - const osgDB::ReaderWriter::Options* opt); + const osgDB::Options* opt); }; struct DefaultCachePolicy { DefaultCachePolicy(const std::string& extension) {} osg::Node* find(const std::string& fileName, - const osgDB::ReaderWriter::Options* opt); + const osgDB::Options* opt); void addToCache(const std::string& filename, osg::Node* node); }; struct NoCachePolicy { NoCachePolicy(const std::string& extension) {} osg::Node* find(const std::string& fileName, - const osgDB::ReaderWriter::Options* opt) + const osgDB::Options* opt) { return 0; } @@ -150,7 +150,7 @@ class OptimizeModelPolicy { public: OptimizeModelPolicy(const std::string& extension); osg::Node* optimize(osg::Node* node, const std::string& fileName, - const osgDB::ReaderWriter::Options* opt); + const osgDB::Options* opt); protected: unsigned _osgOptions; }; @@ -158,7 +158,7 @@ protected: struct NoOptimizePolicy { NoOptimizePolicy(const std::string& extension) {} osg::Node* optimize(osg::Node* node, const std::string& fileName, - const osgDB::ReaderWriter::Options* opt) + const osgDB::Options* opt) { return node; } @@ -167,13 +167,13 @@ struct NoOptimizePolicy { struct OSGSubstitutePolicy { OSGSubstitutePolicy(const std::string& extension) {} std::string substitute(const std::string& name, - const osgDB::ReaderWriter::Options* opt); + const osgDB::Options* opt); }; struct NoSubstitutePolicy { NoSubstitutePolicy(const std::string& extension) {} std::string substitute(const std::string& name, - const osgDB::ReaderWriter::Options* opt) + const osgDB::Options* opt) { return std::string(); } @@ -206,10 +206,10 @@ public: ModelRegistry(); virtual osgDB::ReaderWriter::ReadResult readImage(const std::string& fileName, - const osgDB::ReaderWriter::Options* opt); + const osgDB::Options* opt); virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* opt); + const osgDB::Options* opt); void addImageCallbackForExtension(const std::string& extension, osgDB::Registry::ReadFileCallback* callback); diff --git a/simgear/scene/model/SGMaterialAnimation.cxx b/simgear/scene/model/SGMaterialAnimation.cxx index 07bfe6c7..bec77fa5 100644 --- a/simgear/scene/model/SGMaterialAnimation.cxx +++ b/simgear/scene/model/SGMaterialAnimation.cxx @@ -412,7 +412,7 @@ private: SGMaterialAnimation::SGMaterialAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* + const osgDB::Options* options) : SGAnimation(configNode, modelRoot), texturePathList(options->getDatabasePathList()) diff --git a/simgear/scene/model/SGMaterialAnimation.hxx b/simgear/scene/model/SGMaterialAnimation.hxx index b5b7c0bb..54d1b15b 100644 --- a/simgear/scene/model/SGMaterialAnimation.hxx +++ b/simgear/scene/model/SGMaterialAnimation.hxx @@ -23,7 +23,7 @@ class SGMaterialAnimation : public SGAnimation { public: SGMaterialAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* options); + const osgDB::Options* options); virtual osg::Group* createAnimationGroup(osg::Group& parent); virtual void install(osg::Node& node); static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp); diff --git a/simgear/scene/model/SGReaderWriterXML.cxx b/simgear/scene/model/SGReaderWriterXML.cxx index 2fafbcfa..ec740593 100644 --- a/simgear/scene/model/SGReaderWriterXML.cxx +++ b/simgear/scene/model/SGReaderWriterXML.cxx @@ -58,7 +58,7 @@ using namespace osg; static osg::Node * sgLoad3DModel_internal(const SGPath& path, - const osgDB::ReaderWriter::Options* options, + const osgDB::Options* options, SGPropertyNode *overlay = 0); @@ -78,7 +78,7 @@ const char* SGReaderWriterXML::className() const osgDB::ReaderWriter::ReadResult SGReaderWriterXML::readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* options) const + const osgDB::Options* options) const { osg::Node *result=0; try { @@ -200,7 +200,7 @@ void makeEffectAnimations(PropertyList& animation_nodes, static osg::Node * sgLoad3DModel_internal(const SGPath& path, - const osgDB::ReaderWriter::Options* options_, + const osgDB::Options* options_, SGPropertyNode *overlay) { if (!path.exists()) { diff --git a/simgear/scene/model/SGReaderWriterXML.hxx b/simgear/scene/model/SGReaderWriterXML.hxx index afa5925d..f1a0aed3 100644 --- a/simgear/scene/model/SGReaderWriterXML.hxx +++ b/simgear/scene/model/SGReaderWriterXML.hxx @@ -33,7 +33,7 @@ public: virtual const char* className() const; virtual ReadResult readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* options) + const osgDB::Options* options) const; }; diff --git a/simgear/scene/model/SGText.cxx b/simgear/scene/model/SGText.cxx index e7c536a3..e87b48a7 100644 --- a/simgear/scene/model/SGText.cxx +++ b/simgear/scene/model/SGText.cxx @@ -84,7 +84,7 @@ void SGText::UpdateCallback::operator()(osg::Node * node, osg::NodeVisitor *nv ) } osg::Node * SGText::appendText(const SGPropertyNode* configNode, - SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options) + SGPropertyNode* modelRoot, const osgDB::Options* options) { SGConstPropertyNode_ptr p; diff --git a/simgear/scene/model/SGText.hxx b/simgear/scene/model/SGText.hxx index 19b27c80..a8bf0080 100644 --- a/simgear/scene/model/SGText.hxx +++ b/simgear/scene/model/SGText.hxx @@ -27,7 +27,7 @@ class SGText : public osg::NodeCallback { public: - static osg::Node * appendText(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options); + static osg::Node * appendText(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options); private: class UpdateCallback; }; diff --git a/simgear/scene/model/animation.cxx b/simgear/scene/model/animation.cxx index 110240b9..ee9b4fc9 100644 --- a/simgear/scene/model/animation.cxx +++ b/simgear/scene/model/animation.cxx @@ -410,7 +410,7 @@ SGAnimation::~SGAnimation() bool SGAnimation::animate(osg::Node* node, const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* options) + const osgDB::Options* options) { std::string type = configNode->getStringValue("type", "none"); if (type == "alpha-test") { diff --git a/simgear/scene/model/animation.hxx b/simgear/scene/model/animation.hxx index ae4eaead..e8c7e4b6 100644 --- a/simgear/scene/model/animation.hxx +++ b/simgear/scene/model/animation.hxx @@ -46,7 +46,7 @@ public: static bool animate(osg::Node* node, const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* options); + const osgDB::Options* options); protected: void apply(osg::Node* node); @@ -321,7 +321,7 @@ class SGShaderAnimation : public SGAnimation { public: SGShaderAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* options); + const osgDB::Options* options); virtual osg::Group* createAnimationGroup(osg::Group& parent); private: class UpdateCallback; diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index ef9e11c6..eba1e306 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -39,7 +39,7 @@ using std::vector; osg::Texture2D* SGLoadTexture2D(bool staticTexture, const std::string& path, - const osgDB::ReaderWriter::Options* options, + const osgDB::Options* options, bool wrapu, bool wrapv, int) { osg::Image* image; diff --git a/simgear/scene/model/model.hxx b/simgear/scene/model/model.hxx index 2761d09e..9c9f0342 100644 --- a/simgear/scene/model/model.hxx +++ b/simgear/scene/model/model.hxx @@ -30,12 +30,12 @@ class SGReaderWriterOptions; osg::Texture2D* SGLoadTexture2D(bool staticTexture, const std::string& path, - const osgDB::ReaderWriter::Options* options = 0, + const osgDB::Options* options = 0, bool wrapu = true, bool wrapv = true, int mipmaplevels = -1); inline osg::Texture2D* SGLoadTexture2D(const std::string& path, - const osgDB::ReaderWriter::Options* options = 0, + const osgDB::Options* options = 0, bool wrapu = true, bool wrapv = true, int mipmaplevels = -1) { return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels); @@ -43,7 +43,7 @@ SGLoadTexture2D(const std::string& path, inline osg::Texture2D* SGLoadTexture2D(const SGPath& path, - const osgDB::ReaderWriter::Options* options = 0, + const osgDB::Options* options = 0, bool wrapu = true, bool wrapv = true, int mipmaplevels = -1) { @@ -53,7 +53,7 @@ SGLoadTexture2D(const SGPath& path, inline osg::Texture2D* SGLoadTexture2D(bool staticTexture, const SGPath& path, - const osgDB::ReaderWriter::Options* options = 0, + const osgDB::Options* options = 0, bool wrapu = true, bool wrapv = true, int mipmaplevels = -1) { diff --git a/simgear/scene/model/modellib.cxx b/simgear/scene/model/modellib.cxx index 5c8a2eb2..988afea0 100644 --- a/simgear/scene/model/modellib.cxx +++ b/simgear/scene/model/modellib.cxx @@ -65,7 +65,7 @@ void SGModelLib::setPanelFunc(panel_func pf) } std::string SGModelLib::findDataFile(const std::string& file, - const osgDB::ReaderWriter::Options* opts, + const osgDB::Options* opts, SGPath currentPath) { if (file.empty()) @@ -141,9 +141,9 @@ SGModelLib::loadDeferredModel(const string &path, SGPropertyNode *prop_root, if (SGPath(path).lower_extension() == "ac") opt->setInstantiateEffects(true); if (!prop_root || prop_root->getBoolValue("/sim/rendering/cache", true)) - opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL); + opt->setObjectCacheHint(osgDB::Options::CACHE_ALL); else - opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_NONE); + opt->setObjectCacheHint(osgDB::Options::CACHE_NONE); proxyNode->setDatabaseOptions(opt.get()); return proxyNode; @@ -167,9 +167,9 @@ SGModelLib::loadPagedModel(const string &path, SGPropertyNode *prop_root, if (SGPath(path).lower_extension() == "ac") opt->setInstantiateEffects(true); if (!prop_root || prop_root->getBoolValue("/sim/rendering/cache", true)) - opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL); + opt->setObjectCacheHint(osgDB::Options::CACHE_ALL); else - opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_NONE); + opt->setObjectCacheHint(osgDB::Options::CACHE_NONE); plod->setDatabaseOptions(opt.get()); return plod; } diff --git a/simgear/scene/model/modellib.hxx b/simgear/scene/model/modellib.hxx index a9a3eb0d..10a2fc1e 100644 --- a/simgear/scene/model/modellib.hxx +++ b/simgear/scene/model/modellib.hxx @@ -71,7 +71,7 @@ public: SGModelData *data=0); static std::string findDataFile(const std::string& file, - const osgDB::ReaderWriter::Options* opts = NULL, + const osgDB::Options* opts = NULL, SGPath currentDir = SGPath()); protected: SGModelLib(); diff --git a/simgear/scene/model/particles.cxx b/simgear/scene/model/particles.cxx index 4d1ebc04..0b5f32c8 100644 --- a/simgear/scene/model/particles.cxx +++ b/simgear/scene/model/particles.cxx @@ -135,7 +135,7 @@ void transformParticles(osgParticle::ParticleSystem* particleSys, osg::Group * Particles::appendParticles(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* + const osgDB::Options* options) { SG_LOG(SG_GENERAL, SG_DEBUG, "Setting up a particle system!\n"); diff --git a/simgear/scene/model/particles.hxx b/simgear/scene/model/particles.hxx index a637f20b..cdbb1f21 100644 --- a/simgear/scene/model/particles.hxx +++ b/simgear/scene/model/particles.hxx @@ -111,7 +111,7 @@ class Particles : public osg::NodeCallback public: Particles(); - static osg::Group * appendParticles(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options); + static osg::Group * appendParticles(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, const osgDB::Options* options); virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); diff --git a/simgear/scene/model/shadanim.cxx b/simgear/scene/model/shadanim.cxx index cb9270a3..ea1f1c26 100644 --- a/simgear/scene/model/shadanim.cxx +++ b/simgear/scene/model/shadanim.cxx @@ -187,7 +187,7 @@ static void create_specular_highlights(osg::Node *node) SGShaderAnimation::SGShaderAnimation(const SGPropertyNode* configNode, SGPropertyNode* modelRoot, - const osgDB::ReaderWriter::Options* + const osgDB::Options* options) : SGAnimation(configNode, modelRoot) { diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx index 5bdf91d7..aeac58ff 100644 --- a/simgear/scene/sky/cloud.cxx +++ b/simgear/scene/sky/cloud.cxx @@ -94,7 +94,7 @@ SGMakeState(const SGPath &path, const char* colorTexture, { osg::StateSet *stateSet = new osg::StateSet; - osg::ref_ptr options + osg::ref_ptr options = makeOptionsFromPath(path); stateSet->setTextureAttribute(0, SGLoadTexture2D(colorTexture, options.get())); diff --git a/simgear/scene/sky/moon.cxx b/simgear/scene/sky/moon.cxx index 28275e6a..f6539309 100644 --- a/simgear/scene/sky/moon.cxx +++ b/simgear/scene/sky/moon.cxx @@ -78,7 +78,7 @@ SGMoon::build( SGPath path, double moon_size ) { stateSet->setRenderBinDetails(-5, "RenderBin"); // set up the orb state - osg::ref_ptr options + osg::ref_ptr options = makeOptionsFromPath(path); osg::Texture2D* texture = SGLoadTexture2D("moon.png", options.get()); diff --git a/simgear/scene/sky/newcloud.cxx b/simgear/scene/sky/newcloud.cxx index b27704da..3dee4ab4 100644 --- a/simgear/scene/sky/newcloud.cxx +++ b/simgear/scene/sky/newcloud.cxx @@ -110,7 +110,7 @@ SGNewCloud::SGNewCloud(const SGPath &texture_root, const SGPropertyNode *cld_def "texture"), "image"), texture); - ref_ptr options + ref_ptr options = makeOptionsFromPath(texture_root); ref_ptr sgOptions = new SGReaderWriterOptions(*options.get()); diff --git a/simgear/scene/sky/oursun.cxx b/simgear/scene/sky/oursun.cxx index 59db466c..f2af25f8 100644 --- a/simgear/scene/sky/oursun.cxx +++ b/simgear/scene/sky/oursun.cxx @@ -69,7 +69,7 @@ SGSun::build( SGPath path, double sun_size, SGPropertyNode *property_tree_Node ) env_node = property_tree_Node; - osg::ref_ptr options + osg::ref_ptr options = makeOptionsFromPath(path); // build the ssg scene graph sub tree for the sky and connected // into the provide scene graph branch diff --git a/simgear/scene/tgdb/ReaderWriterSTG.cxx b/simgear/scene/tgdb/ReaderWriterSTG.cxx index f79638bb..47d45e68 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.cxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.cxx @@ -54,7 +54,7 @@ const char* ReaderWriterSTG::className() const osgDB::ReaderWriter::ReadResult ReaderWriterSTG::readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* options) const + const osgDB::Options* options) const { osg::Node* result = TileEntry::loadTileByFileName(fileName, options); // For debugging race conditions diff --git a/simgear/scene/tgdb/ReaderWriterSTG.hxx b/simgear/scene/tgdb/ReaderWriterSTG.hxx index 7c571ccf..f319a6b8 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.hxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.hxx @@ -34,7 +34,7 @@ public: virtual const char* className() const; virtual ReadResult readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* options) + const osgDB::Options* options) const; }; diff --git a/simgear/scene/tgdb/SGReaderWriterBTG.cxx b/simgear/scene/tgdb/SGReaderWriterBTG.cxx index 753720d2..5e2a94b7 100644 --- a/simgear/scene/tgdb/SGReaderWriterBTG.cxx +++ b/simgear/scene/tgdb/SGReaderWriterBTG.cxx @@ -57,7 +57,7 @@ SGReaderWriterBTG::acceptsExtension(const std::string& extension) const osgDB::ReaderWriter::ReadResult SGReaderWriterBTG::readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* options) const + const osgDB::Options* options) const { const SGReaderWriterOptions* sgOptions; sgOptions = dynamic_cast(options); diff --git a/simgear/scene/tgdb/SGReaderWriterBTG.hxx b/simgear/scene/tgdb/SGReaderWriterBTG.hxx index a28ea7eb..dd9d4b57 100644 --- a/simgear/scene/tgdb/SGReaderWriterBTG.hxx +++ b/simgear/scene/tgdb/SGReaderWriterBTG.hxx @@ -30,7 +30,7 @@ public: virtual bool acceptsExtension(const std::string& /*extension*/) const; virtual ReadResult readNode(const std::string& fileName, - const osgDB::ReaderWriter::Options* options) + const osgDB::Options* options) const; }; diff --git a/simgear/scene/tgdb/TileEntry.cxx b/simgear/scene/tgdb/TileEntry.cxx index f196c7dd..f139d145 100644 --- a/simgear/scene/tgdb/TileEntry.cxx +++ b/simgear/scene/tgdb/TileEntry.cxx @@ -131,7 +131,7 @@ void TileEntry::prep_ssg_node(float vis) { } bool TileEntry::obj_load(const string& path, osg::Group *geometry, bool is_base, - const osgDB::ReaderWriter::Options* options) + const osgDB::Options* options) { osg::Node* node = osgDB::readNodeFile(path, options); if (node) @@ -178,7 +178,7 @@ struct Object { osg::Node* TileEntry::loadTileByFileName(const string& fileName, - const osgDB::ReaderWriter::Options* options) + const osgDB::Options* options) { std::string index_str = osgDB::getNameLessExtension(fileName); index_str = osgDB::getSimpleFileName(index_str); diff --git a/simgear/scene/tgdb/TileEntry.hxx b/simgear/scene/tgdb/TileEntry.hxx index 7aec5d1f..c7e8f8e1 100644 --- a/simgear/scene/tgdb/TileEntry.hxx +++ b/simgear/scene/tgdb/TileEntry.hxx @@ -71,7 +71,7 @@ private: static bool obj_load( const std::string& path, osg::Group* geometry, bool is_base, - const osgDB::ReaderWriter::Options* options); + const osgDB::Options* options); /** * This value is used by the tile scheduler/loader to load tiles @@ -106,7 +106,7 @@ public: * Transition to OSG database pager */ static osg::Node* loadTileByFileName(const std::string& index_str, - const osgDB::ReaderWriter::Options*); + const osgDB::Options*); /** * Return true if the tile entry is loaded, otherwise return false * indicating that the loading thread is still working on this. diff --git a/simgear/scene/util/PathOptions.cxx b/simgear/scene/util/PathOptions.cxx index 203247b7..711b04b2 100644 --- a/simgear/scene/util/PathOptions.cxx +++ b/simgear/scene/util/PathOptions.cxx @@ -27,11 +27,11 @@ using namespace simgear; -osgDB::ReaderWriter::Options* simgear::makeOptionsFromPath(const SGPath& path) +osgDB::Options* simgear::makeOptionsFromPath(const SGPath& path) { using namespace osgDB; - ReaderWriter::Options *options - = new ReaderWriter::Options(*(Registry::instance()->getOptions())); + Options *options + = new Options(*(Registry::instance()->getOptions())); options->setDatabasePath(path.str()); return options; } diff --git a/simgear/scene/util/PathOptions.hxx b/simgear/scene/util/PathOptions.hxx index 5bf3a4b7..e1bc331b 100644 --- a/simgear/scene/util/PathOptions.hxx +++ b/simgear/scene/util/PathOptions.hxx @@ -25,7 +25,7 @@ namespace simgear { -osgDB::ReaderWriter::Options* makeOptionsFromPath(const SGPath&); +osgDB::Options* makeOptionsFromPath(const SGPath&); } #endif diff --git a/simgear/scene/util/SGReaderWriterOptions.hxx b/simgear/scene/util/SGReaderWriterOptions.hxx index 29ff31eb..082cfb82 100644 --- a/simgear/scene/util/SGReaderWriterOptions.hxx +++ b/simgear/scene/util/SGReaderWriterOptions.hxx @@ -39,7 +39,7 @@ public: _instantiateEffects(false) { } SGReaderWriterOptions(const std::string& str) : - osgDB::ReaderWriter::Options(str), + osgDB::Options(str), _materialLib(0), _load_panel(0), _model_data(0), @@ -47,7 +47,7 @@ public: { } SGReaderWriterOptions(const osgDB::Options& options, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) : - osgDB::ReaderWriter::Options(options, copyop), + osgDB::Options(options, copyop), _materialLib(0), _load_panel(0), _model_data(0), @@ -55,7 +55,7 @@ public: { } SGReaderWriterOptions(const SGReaderWriterOptions& options, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) : - osgDB::ReaderWriter::Options(options, copyop), + osgDB::Options(options, copyop), _propertyNode(options._propertyNode), _materialLib(options._materialLib), _load_panel(options._load_panel), -- 2.39.5