Hi Robert,

Thank you for all those explanation, it's all make sense now. You're
perfectly right when you say that I want manage my own lighting, that's why
I told the viewer to bet set up with NO_LIGHT. I'm gonna update my svn
version from OSG and try the fix in my own application.

Kind regards,

2009/1/27 Robert Osfield <[email protected]>

> 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
>



-- 
Alexandre AMALRIC                   Ingénieur R&D
===================================
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to