If I understand correctly how the sky dome mesh is constructed, there was a lot of duplication of vertices in the triangle strip arrays, and this has been carried forward into your indexed mesh approach. The INDEX_MESH optimizer would remove these duplicates. The order of the triangles in the output of INDEX_MESH should be the same as the input order, but it might be tricky to pick corresponding triangles out of the new mesh. Since this is such a regular mesh, the vertex cache optimizers would make a small difference; however, you would totally lose the order of the mesh.
What was the actual performance difference? Tim On Thu, Jan 27, 2011 at 10:28 PM, Jean-Sébastien Guay < [email protected]> wrote: > Hi again, > > Well, I've been able to change the 48 small triangle strips per geometry to > a single DrawElements call, with naive code that just puts indices to > replicate what the strip is doing, i.e. 0 1 2 1 2 3 2 3 4 etc. > > The result is a small but noticeable decrease in draw time. It's smaller > than I would have thought. Perhaps there would be an even better way than > the naive approach I'm using? > > I'm attaching the code, see the part starting at #define > USE_TRIANGLE_STRIPS (which needs to be commented to use my changes). > > Thanks, > > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay [email protected] > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > > _______________________________________________ > 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

