[osg-users] layering of text and geometry in a 2.5D setup

stefan nortd stefan at nortd.com
Mon Nov 2 15:03:59 PST 2009


I think I have solved the issue. It turns out that if I simply set a render bin index on all my nodes that contain an osgText, things work as expected. Surprisingly I don't need to set the osg::StateSet::OVERRIDE_RENDERBIN_DETAILS.

I would assume this is normal behavior. I think my main error was to assume that osg preserves the order of nodes when depth testing is switched off.

At the moment I have a unique z-value/render bin index on all of my nodes. It's a bit inelegant because I need to do reassign this z value to all my nodes whenever I add or remove nodes. 

I think I will try to assign this z value only within each geode. I think this is possible because render bins are nested. Not sure yet how this will work then with my ray intersection--how I can determine the order my widgets are hit by the ray ... anyhow i will try to report back if I have a good solution for making this a bit more elegant.

Thanks for the help,
Thanks for the hint that I might be missing a plugin for writing out text drawables to the osg file,

/stefan

------------------------
stefan hechenberger

http://linear.nortd.com

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19077#19077







More information about the osg-users mailing list