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:
@@ -42,7 +42,6 @@
|
||||
#include <osgDB/FileUtils>
|
||||
#include <osgDB/FileNameUtils>
|
||||
|
||||
#include <osgUtil/TriStripVisitor>
|
||||
#include <osgUtil/MeshOptimizers>
|
||||
#include <osgUtil/SmoothingVisitor>
|
||||
#include <osgUtil/Tessellator>
|
||||
@@ -798,14 +797,7 @@ osg::Node* ReaderWriterOBJ::convertModelToSceneGraph(obj::Model& model, ObjOptio
|
||||
// tri strip polygons to improve graphics peformance
|
||||
if (!localOptions.noTriStripPolygons)
|
||||
{
|
||||
osgUtil::IndexMeshVisitor imv;
|
||||
imv.makeMesh(*geometry);
|
||||
|
||||
osgUtil::VertexCacheVisitor vcv;
|
||||
vcv.optimizeVertices(*geometry);
|
||||
|
||||
osgUtil::VertexAccessOrderVisitor vaov;
|
||||
vaov.optimizeOrder(*geometry);
|
||||
osgUtil::optimizeMesh(geometry);
|
||||
}
|
||||
|
||||
// if no normals present add them.
|
||||
|
||||
Reference in New Issue
Block a user