[osg-users] Flipping the normals
Michele Bosi
michele.bosi at gmail.com
Tue Aug 28 14:45:19 PDT 2007
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070828/45a54e3f/attachment.htm
More information about the osg-users
mailing list