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

Robert Osfield robert.osfield at gmail.com
Wed Aug 28 00:56:08 PDT 2019


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 <doublemax at 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 at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190828/dd393642/attachment.html>


More information about the osg-users mailing list