Re: [osg-users] How to make sure that both the back and the front side of a polygon are lit...

2010-06-30 Thread Sunil S Nandihalli
* Hi Tony and Alberto, The following is a snippet of the code I have tried .. It continues to light up only one side of the geometry ... osg::StateSet* st = topo-getOrCreateStateSet(); * *osg::Group* topo = new osg::Group; * *osg::Material* matirial = new osg::Material; *

Re: [osg-users] How to make sure that both the back and the front side of a polygon are lit...

2010-06-30 Thread Alberto Luaces
Sunil S Nandihalli writes: Hi Tony and Alberto,  The following is a snippet of the code I have tried .. It continues to light up only one side of the geometry ...  osg::StateSet* st = topo-getOrCreateStateSet();  osg::Group* topo = new osg::Group;  osg::Material* matirial = new

Re: [osg-users] How to make sure that both the back and the front side of a polygon are lit...

2010-06-29 Thread Alberto Luaces
Hi Sunil, Sunil S Nandihalli writes: Hello everybody,  I would like to have both the front and the back side of the polygons I draw lit. Right now I have specified the normals and only the side which is on the same side as that of the normals is being lit.. Should I render the

Re: [osg-users] How to make sure that both the back and the front side of a polygon are lit...

2010-06-29 Thread Tony Horrobin
Hi Sunil, Just to be clear, you also need to specify a two-sided light model to make OpenGL apply both front and back materials. The osg::LightModel class allows this. Cheers, -Tony ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] How to make sure that both the back and the front side of a polygon are lit...

2010-06-28 Thread Sunil S Nandihalli
Hello everybody, I would like to have both the front and the back side of the polygons I draw lit. Right now I have specified the normals and only the side which is on the same side as that of the normals is being lit.. Should I render the same-geometry twice and add normals to it so that it is