Hi,

I've done this for interoperability between OSG and client library, for exampe 
for a texture :

I've created a "WrapperTexture" class which inherits from osg::StateAttribute 
directly.

- It expose it's StateAttribute type (getType() method) as TEXTURE
- It contain a member which is an instance of my client library's texture class
- in "apply" method, it call the equivalent of "apply" on my client library 
texture class.

You can start be creating a class which inherit from osg::StateAttribute, 
implements all pure-virtual methods and have a look to osg::Texture and 
osg::Texture2D to see what methods needs to be overriden (like getModeUsage() 
and isTextureAttribute())

Cheers,
Aurelien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=55039#55039





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to