HI Kevin, RIght now the way to do multiple lights is to use the OpenGL hardware lights GL_LIGHT0... GL_LIGHT7, must this is limited just one entry per light per RenderStage. To scale up to more lights than 8 then you have use tricks with multiple RenderStage. This topics is rather complex and has been discussed on osg-users alot previously so please search the archives for info on it.
Robert. On Fri, Oct 24, 2008 at 8:59 AM, Kévin FAURE <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I have a problem with light. Later, my scene should be consist of a > multitude of planetary system each lit by a light, and for this reason that > I would have several light0. > I have also seen the project "osgmanylights" but this method doesn't suit > me. > > For now, I have done a very simple osg file which display four spheres, > two on the left side of the scene and two on the right side. My two lights > are also located on both sides of the scene, each in a sphere. > I would like use many light0 in my scene but osg display only the last. > Here is a screenshot with two light0 : > > <a href="http://imageshack.us"><img > src="http://img185.imageshack.us/img185/4232/light0sj6.png" border="0" > alt="Image Hosted by ImageShack.us"/></a><br/><a > href="http://g.imageshack.us/img185/light0sj6.png/1/"><img > src="http://img185.imageshack.us/img185/light0sj6.png/1/w652.png" > border="0"></a> > > Only the last light0 (one the right) is displayed. > > I have tried to understand the RenderStage and RenderBin class but for now, > still nothing... > > Regards. > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org