Hello,
I've a relatively easy task to accomplish, that is to render a mesh both
from inside and outside.
To do this i put the mesh under two different Geodes, in one i set the front
face to clock wise on the other I set the front face to counter clock
wise turning on the backface culling (or
-users] Flipping the normals
Hello,
I've a relatively easy task to accomplish, that is to render a mesh both
from inside and outside.
To do this i put the mesh under two different Geodes, in one i set the
front face to clock wise on the other I set the front face to counter
clock wise turning
Sounds like you want something like:
osg::ref_ptrosg::LightModel lightModel = new osg::LightModel;
lightModel-setTwoSided(true);
myTwoSidedGeode-getOrCreateStateSet()-setAttribuiteAndModes(lightModel.get
()*);*
**
Might not be the exact syntax but pretty close.
On 8/28/07, Michele Bosi [EMAIL
Thanks very much guys, osg::LightModel/GL_LIGHT_MODEL_TWO_SIDE seems
exactly what I needed.
Thankyou,
Mike
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Thanks very much guys,
osg::LightModel/GL_LIGHT_MODEL_TWO_SIDE seems exactly what I needed.
Thankyou,
Mike
In case it's not obvious, with two-sided lighting you do not need to
re-parent your mesh to two Geodes with different face culling. You should be
able to use a single Geode, face
Thanks Paul,
just wanted o add that I am very glad that when it comes to render
states OSG remains so close to OpenGL and doesn't abstract too much
from it, as this case proves, this lets users to reuse their prior
knowledge of OpenGL and makes the library really flexible,
long life to OSG! :)
6 matches
Mail list logo