HI Julien, On Wed, May 6, 2009 at 9:00 AM, Julien Valentin <julienvalenti...@gmail.com> wrote: > I just would like to know if there's a mean to draw my opaque geometries > after transparent one. > Can it be setted as a property of the render bean or other?
You can control draw order using RenderBin's, by default geometry will be dropped into a root RenderBin that is set to state sort and has a bin number of 0. Geometry that is transparent you set the stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN) which actual just does a StateSet::setRenderBinDetails(10, "DepthSortedBin") internally, which the rendering backend reads and sets up a RenderBin that is depth sorted from back to front and has a bin number of 10. RenderBin's are rendered in ascending order, so -10 gets drawn before 0, 10 gets drawn next etc. In your case you do : stateset->setRenderBindDetails(20, "RenderBin"); // draw after transparent bin, and just use default state sorted bin On the StateSet's associated with the geometry that you want to draw after the transparent bin. There are also options to use multiple RenderStages but I'll leave this to another day to explain, for you right now the above should get you on your way. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org