Added readScript/writeScript methods to ReaderWriter

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14366 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-07-14 15:59:06 +00:00
parent 5a7a20d01e
commit 50e63ad3ee
14 changed files with 314 additions and 68 deletions

View File

@@ -61,3 +61,10 @@ bool osgDB::writeShaderFile(const Shader& shader,const std::string& filename, co
return wr.success();
}
bool osgDB::writeScriptFile(const Script& image,const std::string& filename, const Options* options )
{
ReaderWriter::WriteResult wr = Registry::instance()->writeScript( image, filename, options );
if (wr.error()) OSG_WARN << "Error writing file " << filename << ": " << wr.message() << std::endl;
return wr.success();
}