[osg-users] Disable Backface Culling of a node

2009-11-13 Thread Dominic Stalder

Hi there

is there a way to disable the backface culling of a node? If we enable 
some transparency in a box, we want to see the back face. Will there be 
a problem, if we use lighting, does the back face be visible with the 
material color?


Thanks a lot and regards
Dominic
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable Backface Culling of a node

2009-11-13 Thread Glenn Waldron
node-getOrCreateStateSet()-setMode( GL_CULL_FACE, osg::StateAttribute::OFF
);


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Fri, Nov 13, 2009 at 12:59 PM, Dominic Stalder 
dominic.stal...@bluewin.ch wrote:

 Hi there

 is there a way to disable the backface culling of a node? If we enable some
 transparency in a box, we want to see the back face. Will there be a
 problem, if we use lighting, does the back face be visible with the material
 color?

 Thanks a lot and regards
 Dominic
 ___
 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


Re: [osg-users] Disable Backface Culling of a node

2009-11-13 Thread Dominic Stalder

Hi Glenn

thanks but this didn't work. We applied the mode on a loaded osg file. 
Is this a problem?


Glenn Waldron schrieb:
node-getOrCreateStateSet()-setMode( GL_CULL_FACE, 
osg::StateAttribute::OFF );



Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 
+1.703.652.4791



On Fri, Nov 13, 2009 at 12:59 PM, Dominic Stalder 
dominic.stal...@bluewin.ch mailto:dominic.stal...@bluewin.ch wrote:


Hi there

is there a way to disable the backface culling of a node? If we
enable some transparency in a box, we want to see the back face.
Will there be a problem, if we use lighting, does the back face be
visible with the material color?

Thanks a lot and regards
Dominic
___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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
  


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Disable Backface Culling of a node

2009-11-13 Thread Jean-Sébastien Guay

Hi Dominic,

node-getOrCreateStateSet()-setMode( GL_CULL_FACE, 
osg::StateAttribute::OFF );
thanks but this didn't work. We applied the mode on a loaded osg file. 
Is this a problem?


If the osg file contains a stateset which sets GL_CULL_FACE to ON below 
the root node where you set it to OFF, it will be overridden and will be 
ON for the drawables (state is inherited down into the leaf nodes).


If you want to force GL_CULL_FACE to OFF for all nodes below the root of 
your .osg file, use osg::StateAttribute::OFF|osg::StateAttribute::OVERRIDE.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org