Hi Paul, On 5/7/07, Paul Martz <[EMAIL PROTECTED]> wrote:
If the developer just needs to use GL_LIGHT0 for their own purposes, then I don't think they'd need any new methods in View to do that. I think they can just create a Light with number 0 and change its parameters. How does OSG respond when there are two Light objects with the same number? If the user wants to disable lighting or switch over to some other built-in lighting system other than HEADLIGHT, then I agree that new methods in View would be required for that.
One reason to have support for Headlight or Skylight in osg::View would be the ability to use the same light position/direction across separate slave cameras. One of the problems with the existing headlight is that when you have multiple cameras each camera has its own directional vector, and you get lighting discrepancies. osgProducer::Viewer never handled this situation correctly, and osgViewer::Viewer doesn't yet either, but its something I'd like to fix. The fix in this case is compute the headlight for the master cameras view matrix, then transform this into the slave camera by applying the difference between the two matrices. Texgen also has this same issue, although a solution to this is a bit less obvious.. Robert.
_______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/