Gordon: 

I think the idea with the visitor would work for me. 
I apply this visitor to my meshes:

[code]
class StripTexturesVisitor : public osg::NodeVisitor
{
public:

   StripTexturesVisitor()
      : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN)
   {}

   virtual void apply(osg::Node& node)
   {
      osg::StateSet* ss = node.getStateSet();
      if(ss != NULL)
      {
         ss->removeTextureAttribute(0, osg::StateAttribute::TEXTURE);
         ss->removeTextureAttribute(1, osg::StateAttribute::TEXTURE);
      }
      traverse(node);
   }  
};
[/code]

This does not seem to work. The removeTextureAttribute method is called, but I 
can still see the textures on the meshes. Is this the correct way to remove the 
textures?

Thx,
Martin

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





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to