Sounds like you want something like:

osg::ref_ptr<osg::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 PROTECTED]> wrote:
>
> 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 putting the object into a
> single Geode turning off the backface culling). The problem is that in one
> case (when I render the "interior" of the mesh) the polygons are not lit
> since the normals are (of course) not flipped, that is they remain oriented
> "outward".
> My question is: how can I flip the normals? should I create two distinct
> meshes, one with the original normals and the other with inverted normals
> (modifying manually the normal buffers, and doubling the memory usage) or
> there is a more elegant way to do that, for example a node/state like
> GL_PLEASE_FLIP_MY_NORMALS that can take care of this task automatically?
> Cheers,
> Mike
>
> _______________________________________________
> 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

Reply via email to