[osg-users] Reading and writing files
pmartz at skew-matrix.com
Thu Oct 11 10:40:09 PDT 2007
You'll need to do the following to create your own plugin:
* Create a .dll/.so that uses the naming convention "osgdb_<ext>.dll/.so",
where <ext> is the extension of the file you support. (You can also use
* Put your plugin library in a location where OSG can find it. On Windows,
PATH, and on Linux, LD_LIBRARY_PATH.
* Your library must contain a class that derives from osgDB::ReaderWriter.
You'll probably want to override readNode() and acceptsExtension().
* Use the REGISTER_PLUGIN macro in your plugin source code to register your
plugin with the osgDB. See the header file osgDB/Registry.
As suggested by Serge, take a look at any of the existing plugins for
Hope this helps,
Skew Matrix Software LLC
303 859 9466
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of James
Sent: Thursday, October 11, 2007 9:17 AM
To: OpenSceneGraph Users
Subject: [osg-users] Reading and writing files
I have a quick question about reading and writing files using OSG. I have
read the tutorial about reading files, but I would like to be able to read
my own file format by maybe writing the necessary plugin. Could someone
point me in the direction of how I might be able to do this?
Secondly I want to be able to write to an alias wavefront .OBJ file. I
understand again from the reading files tutorial that a plugin for this
exists, but do I need to somehow specify that this plugin should be used?
Could someone maybe give a little example of writing to a file?
Thank you for any help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users