Hello fellow osg users
I've been trying for days to implement what I thought of as a simple thing:
A translucent figure like a dome, a cubus or a triangle where faces behind
don't shine through and which inside faces are rendered when the camera is
inside the figure.
I've managed that by using GL_CULL_FACE
osg::StateSet* states = new osg::StateSet();
states->setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
states->setRenderBinDetails( 2, "RenderBin" );
states->setMode( GL_CULL_FACE, osg::StateAttribute::OVERRIDE |
osg::StateAttribute::ON );
states->setMode( GL_BLEND, osg::StateAttribute::OVERRIDE |
osg::StateAttribute::ON );
states->setMode( GL_DEPTH_TEST, osg::StateAttribute::OVERRIDE |
osg::StateAttribute::ON );
So far so good, but now the problem: If the camera is inside the
translucent figure I don't see the inside faces.
Is there something I'm doing wrong or shouldn't now the inside faces be
drawn (but not the outside faces)?
I know this is more an OpenGL issue but I can't seem to find the answer
anywhere.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org