I'm almost certain that the range for RenderBin numbers is the range of
32-bit signed ints. "0" (for opaque) and "10" (or translucent) are merely
the defaults. If you have no translucent geometry in your HUD, you can start
at 0 and render up as high as you need. If you do have translucent geometry,
then you can either change the bin for translucent geometry to something
like 1000, or you can start your opaque bin numbering at -1000, for example.
 
If you try this and it doesn't work, please post back and let me know, plus
I'll buy you lunch next time I'm in Idaho. :-)
   -Paul
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven R
Woolsey
Sent: Monday, July 30, 2007 4:46 PM
To: [email protected]
Subject: Re: [osg-users] Graph Rendering Traversal order



Paul, 

Thanks for your reply.  I can see that would work for small numbers of
objects as in my example, but what happens if I need to have 20-30 things
stacked on top of each other as a worst case scenario.  That would  exceed
the number of RenderBins.  I have found some references in the archives to
setting the sort order in the render bin, but that is for depth ordering and
I don't think would be helpful in this instance. 

Any other ideas? 

Thanks, 

Steve
 



"Paul Martz" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED] 


07/30/2007 04:15 PM 


Please respond to
[email protected]



To
<[email protected]> 

cc

Subject
Re: [osg-users] Graph Rendering Traversal order

        




You need to set a different RenderBin number for the StateSet of each layer.
The draw traversal processes RenderBins in order, lowest to highest number. 
  
I believe you want to call StateSet::setRenderBinDetails, first param is the
bin number (e.g., 0, 1, 2, etc) and you probably want "RenderBin" for the
second parameter. 
  
I hope that helps. 
   -Paul 
  


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven R
Woolsey
Sent: Monday, July 30, 2007 4:06 PM
To: [email protected]
Subject: [osg-users] Graph Rendering Traversal order


Hi, 

Myself and a co-worker are working with a HUD where we have created some
simple geometric shapes on the same Z-plane in ortho2D mode.  When the scene
is rendered, the topmost elements in the graph are rendered on top.  We are
using 1.2 and have put the HUD under an osg::CameraNode and set the camera
to POSTRENDER. Here is an graph of what we are seeing, where cam is the
osg::CameraNode. 

       cam 
           /     \ 
         a       b 
                    \ 
                     c 
                       \ 
                        d 

The draw order is: d,c,b,a.  This means the 'a' is drawn on top of 'b'.
This breaks what we are trying to accomplish in the HUD. 

I guess I was expecting this to be reversed.  So the question is, how would
I make this draw so the order would be a,b,c,d?  i.e. - d should be on top
of everything else.  Is there a way to do this? 

Thanks, 

Steve 


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



<<ATT00031.jpg>>

<<ATT00034.jpg>>

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to