Hi GG, 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.
Robert. On Wed, 28 Aug 2019 at 06:54, Franco Tang <double...@163.com> wrote: > 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 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org