- How can I deactivate the lighting set by default by the osgViewer ? 

The fact that osgViewer/SceneView set up default lighting does seem to
confuse many users, as your posting demonstrates. However, lighting state is
really no different from any other state. You can control it in your own
scene graph using standard OSG setMode, setAttribute, and
setAttributeAndModes calls.
 
StateSet::setMode( GL_LIGHTING, OFF ); // Disable the OpenGL lighting
feature
StateSet::setMode( GL_LIGHT_0, OFF ); // Disable OpenGL light 0
 
The above two calls disable the two features enabled in osgViewer/SceneView
by default.
 
If you want to leave lighting and light 0 enabled and simply control the
light's attribute (position, color, etc) then you should use osg::Light and
the osg::LightSource node as demonstrated in the osglighting example
program.
 
Hope that helps,
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com <http://www.skew-matrix.com/> 
303 859 9466
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to