<div dir="ltr"><div>Hi GG,</div><div><br></div><div>When you switch off fixed function lighting via GL_LIGHTING you change the way that OpenGL's fixed function pipeline is configured so it no longer uses the glMaterial/osg::Material values and only uses the glColor/ColorArray (osg::Geometry::setColorArray(..) values.</div><div><br></div><div>Robert.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 28 Aug 2019 at 06:54, Franco Tang <<a href="mailto:doublemax@163.com">doublemax@163.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
I add a ShapeDrawable whose GL_LIGHTING was set OFF to osgFX::Outline. <br>
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.<br>
Then I tested with "cow.osgt" whose GL_LIGHTING was OFF, it displayed correctly.<br>
I know when I set GL_LIGHTING OFF, the material would not reflect the color it set.<br>
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?<br>
I am using osg3.4.1 on Windows 10 and do the test in examples/osgoutline.<br>
Thank you!<br>
<br>
Cheers,<br>
GG<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=76603#76603" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=76603#76603</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>