Hi Stephan,
You created a nested renderbin, and because of its non negative bin number it will draw after the contents of the first bin.
Both are DepthSortedBin with binNumber 10.

Regards, Laurens.

On 11/14/2011 5:56 PM, Stephan Maximilian Huber wrote:
Hi

I am having problems with renderbins, this is maybe a bug in osg or I
have problems to understand the concepts behind renderbins.

Here's a simplified test:

root
+ PAT 1
   + geode
     + geo
   + PAT 2
     + geode
       + geo
+ PAT 3
   + geode
     + geo


the root-group has a stateset with TRANSPARENT_BIN, PAT 1 is positioned
at (0/0/0) and has a geode containing a geometry with a red quad (see
links) and another PAT 2 holding some linestrip geometry.  PAT 3
contains a geode with a green geometry, positioned at 100/100/100. The
camera projection matrix is basically a hud.

When PAT 2 has a stateset with
->setRenderingHint(osg::StateAttribute::TRANSPARENT_BIN) then the
depth-sorting is wrong (see bad.osg), if I remove the
setRenderingHint-call, everything is correct (good.osg).

So what's wrong with my setup? basically all drawables should end in
render-bin 10, regardless of additional setRenderingHint-calls by
enclosed childs, shouldn't they?

AFAIK this worked in previous versions of osg.

Attached you'll find two osg-models showing the problem and the
corresponding screenshots:

good: http://scrups.cefix.org//8k/ikhqjtvumlwco.png
bad : http://scrups.cefix.org//8r/nozjb4u5y8owc.png

This is with a recent checkout of osg-trunk (3.1.0)

cheers,
Stephan


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

Reply via email to