Hi Christian,

Unfortunately you can disable GLSL programs (shaders), as OpenGL
itself doesn't support glEnable/glDisable of GLSL programs.  If you
wish to toggle between the fixed function pipeline and using a GLSL
program then you have to remove the Program i.e.

  ss->removeAttribute(m_program.get());

Robert.

On Thu, Aug 28, 2008 at 9:31 AM,  <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I have a short question about Shaders: How can I disable a Shader?
>
> osg::StateSet* ss = m_pNode->getOrCreateStateSet();
> ss->setAttributeAndModes(m_program.get(), osg::StateAttribute::OFF);
>
> Does not work, even if I set it for the first time.
> Where is the trick?
>
> Thanks in advance,
> Christian
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to