Hi Alexandre,

On Tue, Jan 27, 2009 at 5:29 PM, Robert Osfield
<[email protected]> wrote:
> Now, the question for me is why adding the slave fixes things, and why
> without the slave the defaults are having an effect.  It looks like an
> order of initialisation issue - i.e. the master camera and it's
> Renderer intialize with the defaults of the HEADLIGHT which enables
> the GL_LIGHTING mode by default, but the later reset of the
> LightingMode to be NO_LIGHT doesn't actively change the GL_LIGHTING
> mode/enable disable.   I will continue to look into this, but once I
> do fix it the behaviour we should see is that there will be no
> lighting enabled by default if you do NO_LIGHT.

I have now tracked down the inconsitency to osgUtil::SceneView not
passing on changes the GL_LIGHTING mode when the LightingMode is
toggled on/off.  I've now fixed this and checked it into svn/trunk.

This fix, will mean that in your example both with and without the
slave Camera will behave the same, both won't have GL_LIGHTING mode
enabled - which is exactly what you've told the viewer to do, and
since the scene graph doesn't explictly enable GL_LIGHTING then this
mode remains off, so no OpenGL lighting is enabled.

To enable it you simple enable it manually in the scene graph, since
you are managing your lighting in the scene graph then it makes
perfect sense that you you be enabling the GL_LIGHTING mode for the
subgraphs that require OpenGL lighting.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to