]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/util/SGReaderWriterOptions.hxx
Work around apparent OSG 3.2.0 normal binding bug.
[simgear.git] / simgear / scene / util / SGReaderWriterOptions.hxx
index ef7a586487e54c78eadf00c5f0f3baee8aa3e0f6..2a4b983d283194b8c00985e5f89d6f5f94ea0ab3 100644 (file)
@@ -21,7 +21,6 @@
 #define SGREADERWRITEROPTIONS_HXX 1
 
 #include <osgDB/Options>
-#include <osgDB/Registry>
 #include <simgear/scene/model/modellib.hxx>
 #include <simgear/props/props.hxx>
 
@@ -93,19 +92,11 @@ public:
     void setInstantiateEffects(bool instantiateEffects)
     { _instantiateEffects = instantiateEffects; }
 
-    static SGReaderWriterOptions* copyOrCreate(const osgDB::Options* options)
-    {
-        if (!options)
-            options = osgDB::Registry::instance()->getOptions();
-        if (!options)
-            return new SGReaderWriterOptions;
-        if (!dynamic_cast<const SGReaderWriterOptions*>(options))
-            return new SGReaderWriterOptions(*options);
-        return new SGReaderWriterOptions(*static_cast<const SGReaderWriterOptions*>(options));
-    }
+    static SGReaderWriterOptions* copyOrCreate(const osgDB::Options* options);
+    static SGReaderWriterOptions* fromPath(const std::string& path);
 
 protected:
-    virtual ~SGReaderWriterOptions() {}
+    virtual ~SGReaderWriterOptions();
 
 private:
     SGSharedPtr<SGPropertyNode> _propertyNode;