From Art Trevs, add support for saving external shader files.
From Robert Osfield, adding missing member variable initializes and Output::getShaderFileNameForOutput() implementation
This commit is contained in:
@@ -105,6 +105,26 @@ inline bool writeNodeFile(const osg::Node& node, const std::string& filename)
|
||||
return writeNodeFile( node, filename, Registry::instance()->getOptions() );
|
||||
}
|
||||
|
||||
/** Write an osg::Shader to file.
|
||||
* Return true on success,
|
||||
* return false on failure.
|
||||
* Use the Options object to control cache operations and file search paths in osgDB::Registry.
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to write the specified file.*/
|
||||
extern OSGDB_EXPORT bool writeShaderFile(const osg::Shader& shader, const std::string& filename, const ReaderWriter::Options* options );
|
||||
|
||||
/** Write an osg::Shader to file.
|
||||
* Return true on success,
|
||||
* return false on failure.
|
||||
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
|
||||
* for the filename extension, and this plugin then handles the request
|
||||
* to write the specified file.*/
|
||||
inline bool writeShaderFile(const osg::Shader& shader, const std::string& filename)
|
||||
{
|
||||
return writeShaderFile( shader, filename, Registry::instance()->getOptions() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user