Hi Rogrz? On Mon, Aug 30, 2010 at 10:19 AM, myth0904 <[email protected]> wrote: > Actually, i have attached osg::light to lightSource node. > What makes me confused is why different results comes up when using the two > ways of attaching light to lightSource node: > > first one: using setLight method >> osg::LightSource* ls = new osg::LightSource; >> ls->setLight(new osg::Light(0)); > > The other one: using setAttribute > osg::LightSource* ls = new osg::LightSource; > ls->getOrCreateStateSet()->setAttribute(new osg::Light(0));
Attaching to the StateSet isn't attaching the Light in way that the LightSource or the OSG's scene graph traversal pick up on so it gets treated like any normal non positional state - so what I discussed in my previous applies in this case. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

