Hi Martin,

I've used osgDB::readObject() for various purposes over the years, from
archives to configuration files.  A single ReaderWriter can read multiple
formats - for instance the imagio/quicktime plugins do just this, you
simply implement the ones you can handle.  You can preload your plugin to
make sure it's called first and given an opportunity to load a file format,
there is also extension aliasing support in osgDB::Registry that you can
use to allow different file extensions to be associated with particular
plugins.

Robert.

On 6 December 2012 07:16, Martin Scheffler <[email protected]> wrote:

> Hi,
>
> I would like to use the osgDB architecture to load script and xml files,
> possibly other stuff. I would like to be able to use the CURL plugin to
> load these files from the net, which means I can't simply get a path with
> osgDB::findFile and fopen that. Ideally I would like to enter a path or URL
> and somehow get a std::istream in return.
>
> Is reading arbitrary files through the plugin structure possible without
> writing a ReaderWriter plugin for each format and wrapping the return in an
> osg::Object? I only see very concrete methods like
> osgDB::Registry::readImage() or readNode(), not readFile() or something
> similar.
>
> Thank you!
>
> Cheers,
> Martin
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=51432#51432
>
>
>
>
>
> _______________________________________________
> 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