Hi Boto,

Have you looked to osgDB::Registry::setReadFileCallback ? Another way to
achieve what you want can be to make a plugin for your packed file and use
encoded strings as files names to know wich file to get from your pack, ie :
cow.osg|mypack.pack
With such a file name, your plugin will know that it needs the pack
"mypack.pack", and that it needs to load the cow.osg file from it. This way
you can even pass to the OSG plugin a custom std::stream which can read into
your pack system.

Hopes this helps !
Cheers,

On Mon, Aug 11, 2008 at 3:20 PM, Botorabi <[EMAIL PROTECTED]> wrote:

> i am searching for a way which allows having all necessary data files
> packed into a single file -- such as pak files of typical games -- and let
> osg read the image and scene files from that pack file. there is physfs
> which can provide a virtual files system given it a compressed archive file,
> e.g. a zip file.
>
> however, i could not see a central place in osgDB for placing an
> appropriate hook, in order to avoid plugins taking a file name and using std
> streams on their own for accessing the files.
>
> it would be great to set a sort of callback object for accessing the
> content of files and osg would take from that callback object either a data
> buffer for processing or a std stream.
>
> what do you think about this idea?
>
>
> cheers
> boto
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to