Hi Robert,

Please ignor last email, and this request. I've just realised what to do. Put 
it down to temporary moment of insanity on my part.

Thanks for help.

Neil.

---- [email protected] wrote: 
> Hi Robert,
> 
> Thanks for coming back to me so quickly, however I don't think I made myself 
> clear enough, as I'm not sure that osgconv is what I'm looking for. I'm 
> sitting within the zip plugin code, and I have the stream of bytes that 
> represents one of the files within the zip file. I need to know whether I 
> should be passing this stream into a ReadImage, readNode, readObject, or 
> readArchive function - like the Curl plugin does. Now, I can get the 
> appropriate reader as the registry provides functions for doing that. What I 
> need to know, within code, is what type of object that stream represents, so 
> that I can call the appropriate function within the plugin code at runtime. 
> 
> I was hoping that a plugin might publish the type of object it creates via a 
> call, but I've looked at the plugin codes and all that is really available 
> seems to be the extensions that a reader addresses, and not the type of 
> object it returns.
> 
> So, for example, I would like the JPG,TGA,BMP,PNG...(A.N.Other image format) 
> plugins to return IMAGE as the object type they create creates, whilst the 
> OSG, 3DS, FLT, IVE and (A.N.Other object format) would return node.
> 
> Any thoughts ?
> 
> Thanks in advance.
> 
> Neil.
> 
> 
> 
> 
> 
> 
> 
> ---- Robert Osfield <[email protected]> wrote: 
> > 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

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to