Hi Eric,

The process is for doing this is a tad complex, but it is useful to know the process.  In essence you need to create a node kit, which is a fancy name for a set of components that will make this work.  First you need to create a library for your derived osg::Image type.  Second, you need to create an "dot OSGWRapper"  There are several examples of these in the src/osgPlugins directory.  One such file is src/osgPlugins/osg/Image.cpp as an example. 

You need to write the writer and the reader for your extended object type.  In essence, the contents of the .osg file will have, instead of:

          Texture2D {
            DataVariance STATIC
            file "Images/reflect.rgb"
            ....

Will have:

        osgEricsTexture::EricsTexture
{
            DataVariance STATIC
            file "Images/reflect.rgb"
            EricsSpecialSetting True
            ....

where osgEricsTexture declares the name of the plugin osgdb_osgEricsPlugin.{so,dll,dylib} and EricsTexture  declares the name passed in the second argument of the constructor of your osgDB::RegisterDotOsgWrapperProxy class in your plugin.

Let me know if you get this far.

-don

On 8/23/06, Eric Sokolowsky <[EMAIL PROTECTED]> wrote:
I have derived a node from osg::Image to add some custom behavior. However,
when this node is written out it is written as a base osg::Image and my
custom behavior is discarded. How do I write out my extra fields and
read them in again within the osgPlugin architecture? I am mostly interested
in the .osg plugin and the .ive plugin. If the answer is "modify the source
code in your local copy of the osg source repository" then I might have to
rethink my approach to this problem.

--
     ____   __     Eric Sokolowsky  (GST)    NASA Goddard Space Flight Center
    / __/__/_/__  Visualization Programmer    Scientific Visualization Studio
   / __/ _/ / _/ 301.286.3751                  Mailstop 610.3 Bldg 28 Rm E102
  /___/_//_/__/ [EMAIL PROTECTED]   Greenbelt, MD 20771
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to