[osg-users] RenderingHint vs binNumber(RenderBinDetails)

Christophe Medard christophe.medard at oktal.fr
Fri Oct 5 06:55:16 PDT 2007


All right, Tim's right.

So to conclude :
- setRenderingHint is just a shortcut for setRenderBinDetails, it allows not to have to specify the name of bin type, and _renderingHint is useless (for those making inquiries on the OSG source)
- indeed, the binNumber is the draw order number against other children in the parent Group, evaluated in a left-first traversall logic. 

The draw order for this case (3 pass on an geode) is A-B-C. It works well, one just have to beware of z-fighting, through the reuse of the depth buffer of the 1st pass (via setAttributeAndModes(new osg::Depth(osg::Depth::EQUAL,0.0,1.0,false) for example).

  osg::Group "Root"
       |                   |                               |
       |                   |                               |
       |        osg::Group "B"           osg::Group "C"
       |        [binNumber = 20]      [binNumber = 30]
       |                 |                                |
     osg::Geode "A"
     [binNumber = 15]

Thanks to all.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071005/912e6298/attachment-0003.htm>

More information about the osg-users mailing list