Hello,

I'm using RenderBins to display overlapping textures that are contained in
separate geodes. All my geodes are at z = 0.f, so using a standard depth
test is not good for me. I need to use the RenderBin order, but I need to
reverse the order (i.e, if I give a binNum of 0 to a node, I want that node
to be rendered on top of everything, if I give a binNum of 1, is would be
under that first node, and so on. In other words, the bin Num I want to
give is the reverse order a bin is drawn. Is this possible?

I am using the following code:

  osg::StateSet ss = new StateSet;
  ss->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
  ss->setRenderBinDetails(depth, "DepthSortedBin");
  geode->setStateSet(ss);


By searching through the forum, I thought that using "DepthSortedBin" would
guarantee that the render order would be reversed, but it isn't. (By the
way it yields the same result of "RenderBin"), so I misunderstood this
argument).

How can I use reverse order of the RenderBin index?
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to