[osg-submissions] Support for reading images from an osgDB::Archive

Glenn Waldron gwaldron at gmail.com
Sun Jan 20 10:04:51 PST 2008


Robert,

Currently a node file stored in an Archive cannot reference image files also
stored in the Archive. This is an attempt to address the issue.

Attached is an updated osgDB/Registry.cpp. I updated the read() method so
that given an archive in the database path list, will search that archive
for the file to load. It then calls archive->readObject() if it's found.

This works but introduces a secondary issue -- since Archive does not know
about the Registry's ReadFunctors, I just call readObject(). But most of the
image plugins only respond to readImage(). So I've also attached a version
of ReaderWriterJPEG that responds to readObject() ... is this the correct
way to approach it? Or should Archive be able to use ReadFunctors?

Thanks for your consideration. Glenn

-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080120/645d15d8/attachment.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Registry.cpp
Url: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080120/645d15d8/attachment-0001.asc 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ReaderWriterJPEG.cpp
Url: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080120/645d15d8/attachment-0001.pot 


More information about the osg-submissions mailing list