Hi all,
I have a question about OpenGL materials. From what I can see, if I
disable GL_LIGHTING in the stateset of an object, then that object is
rendered with the colors specified in its color array only, i.e. the
material has no effect. Is there a way to change that?
The effect I want is that the object be unaffected by lighting but still
has colors according to its material, i.e. even if no light is present
in the scene, or if there is only a spotlight but it is not pointing
toward the object, its color is defined by its material.
The reason I can't just specify the colors in the color array is that
then, if I use scribe or outline effects (using osgFX::Effect), the
wireframe overlay or outline takes on the vertex colors too instead of
being white (or the color I specify). If there's a way to force the
scribe to be white (i.e. not use the object's vertex colors) that would
work too even though it's the reverse of what I'm asking...
Any suggestions would be appreciated. I've never quite understood the
intricacies of how OpenGL handles vertex colors, materials, shading and
even textures (when one takes precedence over the other, etc.) so I'd
like the advice of someone who knows more than me in this respect.
Thanks,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org