Preet wrote on 2012-07-25: > To improve rendering speed, I went from rendering a ton (hundreds) of > small geometries to combining their vertex data into one geometry so > that I could render everything with fewer draw calls. I'm guessing > OpenSceneGraph was doing some kind of depth sorting when I had > everything as individual geometries, because after merging everything > I get some strange transparency results. Could someone elaborate on > what method the OSG uses for sorting geometries in a depth sorted bin > and how can I recreate the original effect now that I'm left with a > single osg::Geometry? I'm using DrawArrays, so as it stands I have a > list of triangles and I know which chunk of triangles correspond to > which disjoint geometry.
OSG sorts Geometries that are in the (Depth-sorted) Transparent RenderBin by distance to the center of their bounding box and renders them back-to-front. It doesn't do any sorting inside a Geometry, so you have make sure that the data inside the Geometry is properly sorted yourself (or don't merge Geometries that need to be depth-sorted). Hope this helps, -- Bryan Thrall Principal Software Engineer FlightSafety International [email protected] _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

