Hi Robert,

please find enclosed a submission that should improve the 
VertexAccessOrderVisitor (pre-transform) optimizer:
* it sorts primitives to keep "more complex" primitives first; maybe you'll 
prefer to have this as an option (but usually it should make more sense to 
pre-transform triangles before e.g. lines)
* currently, the visitor rely on TriangleIndexFunctor and does not take care of 
points and lines (see 
https://github.com/openscenegraph/osg/blob/master/include/osg/TriangleIndexFunctor#L124-130).
 This can lead to issues e.g. if you store the wireframe lines along with some 
triangles: the triangles will be reindexed but not the line. I've therefore 
added osg/include/TriangleLinePointIndexFunctor to index triangles, lines and 
points and derived VertexReorder from this class.
* to avoid issues, shared arrays are duplicated. However, in some cases (e.g. 
an UV channel shared in the geometry only) this is not required. I'm adding a 
SharedArrayOptimizer to optimize this: it looks for duplicated UVs before the 
array duplication and deduplicate arrays after.

Hope this is useful.
Cheers,
Marc

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




Attachments: 
http://forum.openscenegraph.org//files/vertexaccessordervisitor_152.zip
http://forum.openscenegraph.org//files/vertexaccessordervisitor_848.zip


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

Reply via email to