Hi Martin, The osg::LightSource node is a postional state node - i.e. it positions the osg::Light attached to it in 3D space so it's fixed for the whole scene. Normally I would use the osg:LightSource as a node on it's own without any children, and have the appropriate GL_LIGHTi modes enabled for the parts of the scene that I wish to be illuminated by the LightSource.
Adding children underneath a LightSource allows you to inherit the modes being set on by the LightSource, but this little convenience is only applicable to certain types of scene graph usage. Since it's easy to allow this usage by making LightSource subclass from Group I've done this. Robert. 2010/11/12 "Martin Großer" <[email protected]>: > Hello, > > I have been trying to use the osg::Light and osg::LightSource in my > application this week. The light source is a osg::Group and I would like to > know what's happen when I add a child node to this group? I don't know why > the light source must be a group? What is the reason about this? > > Cheers > > Martin > -- > GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit > gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl > _______________________________________________ > 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

