[osg-users] osgFX::Outline lose material color while GL_LIGHTING set OFF

Franco Tang doublemax at 163.com
Thu Aug 22 05:40:36 PDT 2019


Hi,
I add a ShapeDrawable whose GL_LIGHTING was set OFF to osgFX::Outline.  
I found the border generated by stencil diplayed as ShapeDrawable's color rather than the color I set to osgFX::Outline. When I set GL_LIGHTING ON, it displayed correctly.
Then I tested with "cow.osgt" whose GL_LIGHTING was OFF, it displayed correctly.
I know when I set GL_LIGHTING OFF, the material would not reflect the color it set.
However, I can't get the point. I am a new prgrammer on opengl and osg. Can any body tell me why and how to display the right color while GL_LIGHTING set OFF?
I am using osg3.4.1 on Windows 10 and do the test in examples/osgoutline.
Thank you!

Cheers,
GG

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=76603#76603







More information about the osg-users mailing list