Hi Neil, In OSG-2.8 you can do osgconv --formats to get a listed of all the capabilities of the plugins.
Robert. On Wed, Apr 1, 2009 at 5:29 PM, <[email protected]> wrote: > Hi All, > > Can anyone tell me whether there is a way (call) in OSG to say what type of > object a plugin will produce ? i.e. if I have a file "A.jpg" and I call > osgDB::Registry::instance()->getReaderWriterForExtension passing in the file > extension, I get the readerwriter. What I would like to know is what > ObjectType that readerwrite would return. > > The reason for the question is I'm updating the ReaderWriterZip plugin to > handle in-memory zip extraction, and I want to be able to give it a zip file > that contains many files of varying format. Rippling through the zip file I > can get the individual files, and their content, and unzip them in memory, > but the issue I have is that I don't really want to have a big If statement > in the plugin to look at the known file extensions and to say whether I > should be calling ReadNode or ReadImage. I would like to be able to enquire > the type of Object that the reader would produce, and then have a simple > switch statement like the Curl plugin. > > One route I thought of would be to add to extend each plugin to have a > function based that returns the type of object, and I guess this would be > fairly straight forward, but before delving in, I just wanted to check if > there is a method already available. > > Many thanks for any help. > > Neil. > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

