Paul Martz <[EMAIL PROTECTED]> writes:
>
> > what is the right way to implement a "render depth first"
> > pass? Is there some demo code for that?
> >
>
> You can setSortMode() on the RenderBins that you're using.
>
> RenderBin* rb = RenderBin::getRenderBinPrototype("RenderBin");
> rb->setSortMode(SORT_FRONT_TO_BACK);
>
> In the code above, "RenderBin" == the opaque bin. You probably don't want to
> change the sorting method used by the transparent bin (but if you do, it's
> name is "DepthSortedBin" -- it sorts back to front by default).
>
Thanks for your hints, that worked well. But I had to find out, that my real
performance problem was using different shader programs, which got changed to
often during traversal. But with your hint to the render bins I found a
solution: give each of the shader progs a number and use that number for the
render bin hints.
thx Ralph
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org