On 9/17/2011 7:42 AM, Aurelien Albert wrote:
Hi,

I want to understand the render order of the different objects in an OSG scene.

For example, with this scene :

[Image: http://img4.hostingpics.net/thumbs/mini_829034graph.png ]

Assuming A1, B2, B3, C2, and C3 are all Geodes, then their Drawables are sorted during cull by the address of their StateSet, and rendered grouped by state. Not sure how OSG determines which state group renders first.

Now, if I modify the RenderBins, using :

A->setRenderBinDetails(1000, "RenderBin");
B->setRenderBinDetails(2000, "RenderBin");
C->setRenderBinDetails(3000, "RenderBin");

The Drawables associated with A1 render first.
Second, the Drawables associated with B2 and B3 render grouped by state.
Third, the Drawables associated with B2 and B3 render grouped by state.

Now, if I modify the RenderBins, using :

A->setRenderBinDetails(1000, "RenderBin");
B->setRenderBinDetails(2000, "RenderBin");
B1->setRenderBinDetails(4000, "RenderBin");
C->setRenderBinDetails(3000, "RenderBin");
C1->setRenderBinDetails(5000, "RenderBin");

I suggest you walk through the CullVisitor in a debugger and become familiar with how and when it creates new RenderBins.
   -Paul


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

Reply via email to