Robert,

Just a nuisance tidbit that I recently wrestled with... it appears there
are some things in the FFP that you can't get at via GLSL (at present).

I tried to get at the GL_LIGHTING state from within the shader and couldn't
access it.  I asked around a little and was told that GL_LIGHTING "and some
other states" are available to the FFP functions, but not the shader.
(I never followed up on what "other states" were included).

So a "generic" shader that emulates FFP would need to test GL_LIGHTING
and if OFF, perform the non-shaded coloring and return.  To get this, you'll
need a little help in the software side.

For example, a visitor that removed the shader or used a different shader
when GL_LIGHTING was off, or (the manner I chose), to create a uniform that
tracked the GL_LIGHTING state to emulate that.

Regards,
Bill


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

Reply via email to