Fixed check against totaly number of vertices

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14262 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2014-06-16 16:16:10 +00:00
parent 8d06b9b019
commit c6ab14018a

View File

@ -2011,7 +2011,7 @@ bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode)
for(;eachGeom!=duplicateList.end(); ++eachGeom) for(;eachGeom!=duplicateList.end(); ++eachGeom)
{ {
unsigned int numAddVertices((*eachGeom)->getVertexArray() ? (*eachGeom)->getVertexArray()->getNumElements() : 0); unsigned int numAddVertices((*eachGeom)->getVertexArray() ? (*eachGeom)->getVertexArray()->getNumElements() : 0);
if (numVertices+numAddVertices<_targetMaximumNumberOfVertices) if ((numVertices+numAddVertices)>_targetMaximumNumberOfVertices)
{ {
break; break;
} }