HI Hesicong,

The transparent bin hint just maps to a back to front depth sorted
RenderBin placed at bin 10.  What you want is a RenderBin set to sort
front to back.  To do this you'll need to set up a RenderBin
prototype, in you application set up, with the required settings, then
refer to this bin in your scene via by assigning the name you give the
bin via StateSet::setRenderBinDetails(..);   Something like:

main(..)
{

osgViewer::Viewer viewer;

// set up the prototype which to clone during rendering
osgUtil::RenderBin::addRenderBinPrototype("FrontToBack",
       new osgUtil::RenderBin(osgUtil::RenderBin::SORT_FRONT_TO_BACK));

// set up my scene graph etc..
....

myvolumestateset->setRenderBinDetails(9,"FrontToBack");

return viewer.run();

}

Robert.

On Wed, Aug 6, 2008 at 2:31 PM, hesicong2006 <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm now working on a volume rendering project. What I need is to improve
> performance. I had to split one volume bounding box into numbers of boxes.
> The very important work to do is to sort the geometry. Boxes must be
> rendered from nearest position to farest to get right visual.
> So, does OSG has some functions to perform this task? Can the
> setRenderingHint(osg::StateSet::TRANSPARENT_BIN) really help me?
> Thanks!
>
> Hesicong
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to