X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Fmodel%2FModelRegistry.hxx;h=24e78eb27c645ec0e69e65d016f3a9cd119b71dc;hb=5a96b283f63cfacd3a3a90a82246defb038242d3;hp=94931bca1e287674f2653111efc2dea772d3a285;hpb=e37c218c2ac71aa40df21b789315a0f2f4eace87;p=simgear.git diff --git a/simgear/scene/model/ModelRegistry.hxx b/simgear/scene/model/ModelRegistry.hxx index 94931bca..24e78eb2 100644 --- a/simgear/scene/model/ModelRegistry.hxx +++ b/simgear/scene/model/ModelRegistry.hxx @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -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; @@ -98,12 +98,12 @@ public: _bvhPolicy.buildBVH(fileName, optimizedNode.get()); _cachePolicy.addToCache(fileName, optimizedNode.get()); } - return ReaderWriter::ReadResult(optimizedNode); + return ReaderWriter::ReadResult(optimizedNode.get()); } 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);