I was able to achieve similar results by using the distance between the camera eye and the bounding box center of each object to sort the vertices before assigning them to the geometry.
I have a quick follow up question: Does OSG micromanage/maintain vertex buffers? I added a primitive to my merged osg::Geometry using DrawArrays... will OSG split the vertex data up into multiple buffers if the size exceeds some threshold? Regards, Preet On Wed, Jul 25, 2012 at 1:40 AM, Preet <[email protected]> wrote: > Hi, > > 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. > > > Preet _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

