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 extension aliases.) * 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 examples. Hope this helps, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> 303 859 9466
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Dickson Sent: Thursday, October 11, 2007 9:17 AM To: OpenSceneGraph Users Subject: [osg-users] Reading and writing files Hi, 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, James -- James Dickson
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

