Better idea -- Write out the subgraph that draws your text -- and also
contains the override render bin bit, to a .osg file and post here or
email me. I'll take a look to see if the render bin details are set
correctly.
-Paul
Paul Martz wrote:
Are you setting this StateSet on the parent Group or Geode above all
your Text? If so, it should work. If it's not working, then this should
be investigated and resolved. I'd advise creating a very simple scene
graph that appears to reproduce the behavior, and stepping through the
CullVisitor to find out why it is changing RenderBins even though a
parent scene graph has set the override bit.
(For more information on RenderBins in general, search the mail list. I
almost hate to advise this, as the info is scattered all over the place,
and you'll need to do a lot of digging and reading. But it has been
discussed multiple times in the past, and I don't have the cycles to
regurgitate the salient info at the moment.)
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466
stefan nortd wrote:
Thanks Paul, Jeremy,
So after some contemplation I am pretty sure I want to use the
painter's layering. The reason is that if for example I want to
rotate a panel in front of another one I don't want it to intersect
with panals behind it. I could use orthographic projection and
dynamically change the z distances
based on bounding box but this just seems overkill if I could just
disable depth testing. I just want it 2.5D--looking 3D but layering 2D.
So I tried forcing the osgText in a the opaque render bin with the
following
but without much luck.
mytextstateset->setRenderBinDetails(0, "RenderBin",
osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
Is there something else I need to do other than that? If I understand
correctly there are two default bins--"RenderBin" and
"DepthSortedBin". Former is sorted based on the binNum, latter based
on the depth.
I guess what I don't understand is how does the binNum realate to the
other items in the default bin. I know they are rendered in the order
they are added to the scene. How to they relate to the binNum? Still a
bit confused.
Will read some more of the osg source code but let me know if you guy
know what I am doing wrong.
Thank you!
Cheers,
stefan
------------------------
stefan hechenberger
http://linear.nortd.com
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18733#18733
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org