[osg-users] drawable and text order in different windows

Anna Palazzolo apala at vi-grade.com
Tue Apr 12 00:57:51 PDT 2011


Hi all,

I'm sorry to bother you with a problem already analyzed in a lot of different threads, but I cannot manage to find a simple solution.

My problem is this:
I have several widgets to create (each one has it's own window in which it's created) : in each widget I have a mix of geometry and text (I'm using labels), and I'd like the text to be displayed over some geometry, but beside some others.

I've tried with:
stateset->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
stateset->setRenderBinDetails(orderedNumber, "RenderBin", osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);

for each of the drawable objects, and I succeed in obtaining the order I wanted for that window.

The problem is that if I pick up one of the others windows, (and the windows are partially overlapped) I'd like the new window drawables to stay in front of the older window drawables, but I think that having disabled the depth test, I'm not using the automatic windowManager and windows update method to render windows elements in the correct order.

Any advice to give me? or any documentation/ forum-thread to address me to?


Thank you!

Cheers,
Anna :-*

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








More information about the osg-users mailing list