Hi,

Hi Robert,

please find the mergeTriangleStrip code merged in osgUtil::TriStripVisitor.
I've removed the references to DrawArrays as we should no longer produce any.

Note that:
* as the name suggest, it only works for triangle strips but could probably be 
easily extended to quads
* the resulting primitive is not highly optimized; we could probably sort the 
strips in order to minimize the number of primitive restart
* as we may merge DrawElementsUInt and DrawElementUShort, the code will only 
generate DrawElementsUInt. I've added a dedicated visitor 
(https://github.com/cedricpinson/osg/blob/develop/src/osgPlugins/osgjs/CompactBufferVisitor)
 to optimize this and it could maybe go in osg?

Also I've been working on mesh optimizers lately (more submissions to come) and 
I'd love if we could do some "refactoring". Namely, it would be nice if we 
could move the struct/class definitions in a header to let users derive from 
them for specific needs. Current architecture has forced us to duplicate a lot 
of code 
(https://github.com/cedricpinson/osg/blob/develop/src/osgPlugins/gles/glesUtil) 
that could be easily avoided.
Is this something we could do?


Thank you!

Cheers,
Marc

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62036#62036




Attachments: 
http://forum.openscenegraph.org//files/tristripvisitor_185.zip
http://forum.openscenegraph.org//files/tristripvisitor_606.zip


_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to