Removed usage of the osgUtil::TriStripVisitor is it generates osg::Geometry that perform very poorly when using VBO and VAO's vs GL DisplayLists.

With DisplayLists being deprecated in GL and VBO and VAO becoming standard it's best to standardize on using the osgUtil::MeshOptimizers instead of TripStrupVisitor
This commit is contained in:
Robert Osfield
2018-04-20 11:42:31 +01:00
parent 547340659f
commit a082b57c3f
16 changed files with 24 additions and 207 deletions

View File

@@ -1,7 +1,7 @@
#include <stdlib.h>
#include <osg/Geode>
#include <osgUtil/TriStripVisitor>
#include <osgUtil/MeshOptimizers>
#include "VBSPGeometry.h"
@@ -653,9 +653,7 @@ ref_ptr<Group> VBSPGeometry::createGeometry()
// Now, stripify the geode to convert the POLYGON primitives to
// triangle strips
osgUtil::TriStripVisitor tsv;
geode->accept(tsv);
tsv.stripify();
osgUtil::optimizeMesh(geode);
}
// Now do the same for the displacement surfaces (if any)