HI Rabbi, The osg::LightSource node is a positional state node - it binds the attached osg::Light to a position in space. The OpenGL light can be enabled/disabled for other subgraphs just via stateset->setMode(GL_LIGHT0+lightNum, osg::StateAttribute::ON); The osglight example illustrates this.
Robert. On Thu, Jun 25, 2009 at 11:41 PM, Rabbi Robinson<[email protected]> wrote: > Hi, > > I have some basic questions about the light setup in osg. I looked at the > example osglight. It seems there is a osg::Light class and there is a > osg::LightSource. One is state attribute and another is a group. Can someone > explain practically how a light and lightsouce work together. For example, if > I have a geode that has normal and material set up. How do I enable OpenGL > lighting on it using osg::Light and osg::LightSource? > > Thank you! > > Cheers, > Rabbi > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=14566#14566 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

