> Sometimes we might want to control the ordering of how things > are actually drawn. We have cases where we'd like things to > come out in the order in which they appear in a depth-first > traversal of the scene graph, with no zbuffer. (Obviously, > this is a special case, usually just 2D.) > > We can turn off the zbuffer, but how would we get OSG to not > sort into bins or re-order in any other way? > > We have a SceneView and call cull and draw on it.
Well, the OSG way is to put things in a RenderBin. So, you could create your own custom RenderBin and then override the methods that handle sorting so that the sort is a no-op. Then change the StateSet that your scene graph uses so that the CullVisitor places everything in this new custom RenderBin. That's the easy way to do it. The more complex way to do it would be to write your own CullVisitor that actually does the rendering instead of creating a RenderGraph with RenderBins. Because you're using SceneView, this should be possible, though I'd still lean towards the custom RenderBin approach myself. -Paul _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
