The only way to turn off a glProgram in GL is glUseProgram(0), there is no glEnable/glDisable.
In OSG you do that by creating an "empty" osg::Program, one with no osg::Shaders attached. Just attach that empty osg::Program where you want to revert to fixed-function. Further details in http://mew.cx/osg_glsl_july2005.pdf cheers -- mew On Wed, Nov 12, 2008 at 2:55 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC <[EMAIL PROTECTED]> wrote: > Hello, > > > > Is there a "light weight" way to turn off shaders in OSG without unloading > the vertex and fragment shaders from the shader program? > > > > My application needs to switch back and forth from the shader pipeline to > the fixed pipeline and vice versa during runtime. This can be done at the > OpenGL level by calling the function glUseProgramObject() to make the quick > switch. Is there an equivalent in OpenSceneGraph? > > > > Thanks in advance, > > -Shayne > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- Mike Weiblen -- Boulder Colorado USA -- http://mew.cx/ _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

