Hi Paul, On 5/6/07, Paul Martz <[EMAIL PROTECTED]> wrote:
Hi Robert -- I had one Quick Start Guide reviewer mention that I should probably include infor mation on how osgViewer sets up a default light. This appears to be because the Viewer class uses a SceneView internqally and configures it with a HEADLIGHT. There doesn't appear to be a way for an application to overrride this or otherwise access the SceneView via the Viewer class.
I haven't pondered this issue in the development of osgViewer, but thinking about it now it might be appropriate to add the global light control into osg::View, then use this to configure osgUtil::SceneView internally. Note, my intention is that SceneView is an internal implementation detail that the end user needn't worry about, its part of the implementation that will change in the furture too, so access to it features if useful really has to go high level classes such osg::View or the osgViewer::Viewer classes.
Seems like I should document this as: Viewer configures a default light, GL_LIGHT0. If you want to use lighting but need to change Viewer's default configuration, just change the attributes of GL_LIGHT0. If you don't need lighting, disable GL_LIGHTING and set it to PROTECTED. Does this sound like the right way to document Viewer's built-in lighting mechanism?
If the light is part of the scene then its approach to use an osg::LightSource. If the light is associated with the viewer then its more appropriate to use new methods added to osg::View to control it. I can code stuff up to fit, but would like a bit of feedback first. Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
