Refactored the Registry::ReadFileCallback, WriteFileCallback and ReaderWriter::Options to they are now defined in their own header and in the osgDB namespace.
Introduced a new FindFileCallback to Registry to compliement the existing ReadFileCallback and WriteFileCallback. Added support for assign Find, Read and WriteFileCallbacks to osdDB::Options to enable plugins/applications to override the callbacks just for that read/write call and any nested file operations
This commit is contained in:
@@ -33,7 +33,7 @@ namespace osgDB {
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::Object* readObjectFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::Object* readObjectFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Object from file.
|
||||
* Return valid osg::Object on success,
|
||||
@@ -53,7 +53,7 @@ inline osg::Object* readObjectFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::Image* readImageFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::Image* readImageFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Image from file.
|
||||
* Return valid osg::Image on success,
|
||||
@@ -73,7 +73,7 @@ inline osg::Image* readImageFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::HeightField* readHeightFieldFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::HeightField* readHeightFieldFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::HeightField from file.
|
||||
* Return valid osg::HeightField on success,
|
||||
@@ -93,7 +93,7 @@ inline osg::HeightField* readHeightFieldFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::Node* readNodeFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::Node* readNodeFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Node from file.
|
||||
* Return valid osg::Node on success,
|
||||
@@ -110,7 +110,7 @@ inline osg::Node* readNodeFile(const std::string& filename)
|
||||
/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more
|
||||
* than one subgraph has been loaded.
|
||||
* Use the Options object to control cache operations and file search paths in osgDB::Registry.*/
|
||||
extern OSGDB_EXPORT osg::Node* readNodeFiles(std::vector<std::string>& commandLine,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::Node* readNodeFiles(std::vector<std::string>& commandLine,const Options* options);
|
||||
|
||||
/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more
|
||||
* than one subgraph has been loaded.*/
|
||||
@@ -123,7 +123,7 @@ inline osg::Node* readNodeFiles(std::vector<std::string>& commandLine)
|
||||
/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more
|
||||
* than one subgraph has been loaded.
|
||||
* Use the Options object to control cache operations and file search paths in osgDB::Registry.*/
|
||||
extern OSGDB_EXPORT osg::Node* readNodeFiles(osg::ArgumentParser& parser,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::Node* readNodeFiles(osg::ArgumentParser& parser,const Options* options);
|
||||
|
||||
/** Read an osg::Node subgraph from files, creating a osg::Group to contain the nodes if more
|
||||
* than one subgraph has been loaded.*/
|
||||
@@ -139,7 +139,7 @@ inline osg::Node* readNodeFiles(osg::ArgumentParser& parser)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::Shader* readShaderFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::Shader* readShaderFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Shader from file.
|
||||
* Return valid osg::Shader on success,
|
||||
@@ -159,7 +159,7 @@ inline osg::Shader* readShaderFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
inline osg::Shader* readShaderFile(osg::Shader::Type type, const std::string& filename,const ReaderWriter::Options* options)
|
||||
inline osg::Shader* readShaderFile(osg::Shader::Type type, const std::string& filename,const Options* options)
|
||||
{
|
||||
osg::Shader* shader = readShaderFile(filename, options);
|
||||
if (shader && type != osg::Shader::UNDEFINED) shader->setType(type);
|
||||
@@ -184,7 +184,7 @@ inline osg::Shader* readShaderFile(osg::Shader::Type type, const std::string& fi
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Object> readRefObjectFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Object> readRefObjectFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Object from file.
|
||||
* Return an assigned osg::ref_ptr on success,
|
||||
@@ -204,7 +204,7 @@ inline osg::ref_ptr<osg::Object> readRefObjectFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Image> readRefImageFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Image> readRefImageFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Image from file.
|
||||
* Return an assigned osg::ref_ptr on success,
|
||||
@@ -224,7 +224,7 @@ inline osg::ref_ptr<osg::Image> readRefImageFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::HeightField> readRefHeightFieldFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::HeightField> readRefHeightFieldFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::HeightField from file.
|
||||
* Return an assigned osg::ref_ptr on success,
|
||||
@@ -244,7 +244,7 @@ inline osg::ref_ptr<osg::HeightField> readRefHeightFieldFile(const std::string&
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Node> readRefNodeFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Node> readRefNodeFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Node from file.
|
||||
* Return an assigned osg::ref_ptr on success,
|
||||
@@ -264,7 +264,7 @@ inline osg::ref_ptr<osg::Node> readRefNodeFile(const std::string& filename)
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to read the specified file.*/
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Shader> readRefShaderFile(const std::string& filename,const ReaderWriter::Options* options);
|
||||
extern OSGDB_EXPORT osg::ref_ptr<osg::Shader> readRefShaderFile(const std::string& filename,const Options* options);
|
||||
|
||||
/** Read an osg::Shader from file.
|
||||
* Return an assigned osg::ref_ptr on success,
|
||||
|
||||
Reference in New Issue
Block a user