Hi, Unfortunately in OpenGL the programs arn't controlled by OpenGL modes so enable/disablling does work, this means in turn that the OSG can't turn it on/off via the usual means used for StateAttributes. To switch off a osg::Program you just attach an empty osg::Program.
On 5/9/07, D. C. Fennell <[EMAIL PROTECTED]> wrote:
Hello, When setting a StateSet attribute to an osg::Program, for example, and using the mode to be osg::StateAttribute::OFF, the program is still enabled. I want to dynamically turn on/off attributes and I assume this can be done with the mode value. With the mode value set to OFF, I am assuming that this attribute will set glUseProgram(0), thus disabling the program. Stepping through the code, it always sets the program, even when using the override value. This occurs with other attributes as well, including texture modes, i.e, setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::OFF) does not disable this texture unit. What am I doing wrong? Thanks for any help. _______________________________________________ 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/
