HI Tanguy, 2009/4/2 Tanguy Fautre <tang...@aristechnologies.com>
> Do you suggest I create an additional bin type (e.g. GUI_ELEMENT_BIN) in > addition to OPAQUE_BIN and TRANSPARENT_BIN, and write my own sort algorithm > for those (i.e. render in the same order children appears in) ? > Implicit rendering order is bound to be open to error, if the traversal order changes then you'll hit upon problems, so I would not recommend going this route. You can certainly implement your own RenderBin, just assign a RenderBinPrototype with the appropriate sort order and provide a name for it so that the StateSet's of your geometry can select it. However, while it's technically quite straight forward to do I would recommend doing it in the manner your are looking for, explcit control of rendering order is the best way to go. One route to making explictly render order easiler to manage would be via a "Layer" node. This "Layer" node would drop it's children in to different bins. I've been considering writing a osg::Layer node for quite a few years, but never have had the time nor something that critically needed it. Your welcome to collabroate on developing a new osg::Layer node :-) Robert.
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org