Clean up up osg::Geometry, removing long deprecated support for array indices and BIND_PER_PRIMITIVE binding that forced OpenGL slow paths. osg::Geometry is now smaller and only supports OpenGL fasts paths.
New methods osg::Geometry::containsDeprecatedData() and osg::Geometry::fixDeprecatedData() provide a means for converting geometries that still use the array indices and BIND_PER_PRIMITIVE across to complient versions. Cleaned up the rest of the OSG where use of array indices and BIND_PER_PRIMITIVE were accessed or used.
This commit is contained in:
@@ -279,17 +279,7 @@ void IndexMeshVisitor::makeMesh(Geometry& geom)
|
||||
// nothing to index
|
||||
if (!numSurfacePrimitives || !numNonIndexedPrimitives) return;
|
||||
|
||||
// check to see if vertex attributes indices exists, if so expand them to remove them
|
||||
if (geom.suitableForOptimization())
|
||||
{
|
||||
// removing coord indices
|
||||
OSG_INFO<<"TriStripVisitor::stripify(Geometry&): Removing attribute indices"<<std::endl;
|
||||
geom.copyToAndOptimize(geom);
|
||||
}
|
||||
|
||||
|
||||
// compute duplicate vertices
|
||||
|
||||
typedef std::vector<unsigned int> IndexList;
|
||||
unsigned int numVertices = geom.getVertexArray()->getNumElements();
|
||||
IndexList indices(numVertices);
|
||||
|
||||
Reference in New Issue
Block a user