Hi Marc, On 20 November 2014 at 10:38, Robert Osfield <[email protected]> wrote:
> I'm inclined towards just having the DrawElements* code path rather adding > complexity to enable/disable the possibility of having DrawArray usage > sporadically with an osg::Geometry. So rather than merge I'll open the > discussion to simplifying the code. > What I have done is checked in the removal of the DrawArrays code. This simplifies TriStripVisitor.cpp and from my own testing doesn't look to affect performance. What it does do is simplify the code which will make it easier to look at adding more optimizations to the visitor. For instance modern hardware much prefers big batches of primitives rather than lots of small ones like the TriStripVisitor can do on certain datasets. These datasets would be better handled by putting all the data into a single DrawElements primitive set and then use GL_TRIANGLES rather than GL_TRIANGLE_STRIP, the tri stripping process would still help the ordering of the indices so the vertex cache is used. The other alternative would be to insert repeated indices into the primitive set to create zero area triangles that join separate tri strips together. Finally using the primitive restart on modern hardware would be possible too. Robert.
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
