Re: [osg-users] osgDB loader question

2008-11-05 Thread Robert Osfield
Hi Sean, As Wang Rui pointed out the osgDB::ReaderWriter's have a readNode/writeNode(std::istream,Options*) interface that a number of plugins support. The easiest way to use it in the case of a byte buffer is to create a std::stringstream, populate this than pass it in. Have a look at the

[osg-users] osgDB loader question

2008-11-04 Thread Sean Spicer
Is there a way to load files from a byte-buffer? I'd like to be able to store certain shape-files as resources and load them with something similar to: osgDB::readNodeFile(shapeFile) something like: osgDb::readFromByteBuffer(char *buffer, size_t size); I can't find anything like this in the

Re: [osg-users] osgDB loader question

2008-11-04 Thread Wang Rui
Hi Sean, Try this: osgDB::ReaderWriter::readNode(std::istream, const Options* =NULL) You should obtain the ReaderWriter plugin first: osgDB::Registry::instance()-getReaderWriterForExtension( osgDB::getLowerCaseFileExtension(filename) ); It supports .osg files. Wang Rui 2008/11/5 Sean Spicer