Hi Paul and al.,

Yes the geometries do have color and normal arrays. From what I understand the 
problem is that the scene light is applied only after the geometry is drawn,
therefore using last frame light settings when drawing the geometry. Since the 
help / stats handlers apply their default light at the end of the frame, it 
will be
used for the next frame scene render.

 This render order issue seems to be directly related to the implementation of 
the EffectNode and its overriding of the traverse() and cull() functions.


cheers,


guillaume

________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Paul Martz
Sent: September-19-11 4:56 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Lighting problem when using help or stats handler

On 9/19/2011 2:43 PM, Poirier, Guillaume wrote:
Hello OSG users,

My problem is simple to describe: When in our application we press 's' or 'h' 
to display either the stats or help, the
lighting changes when it should not.

Check to make sure that all Geometry objects in your scene specify a color 
array and a normal array. OSG does not provide a default if these are missing, 
so they inherit the value last set in the OpenGL state machine. Both affect 
lighting (color affects lighting because OSG's default is to enable 
GL_COLOR_MATERIAL if no Material StateAttributes are present).
   -Paul


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

Reply via email to