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:
parent
8d06b9b019
commit
c6ab14018a
@ -2008,10 +2008,10 @@ bool Optimizer::MergeGeometryVisitor::mergeGeode(osg::Geode& geode)
|
||||
unsigned int numVertices(duplicateList.front()->getVertexArray() ? duplicateList.front()->getVertexArray()->getNumElements() : 0);
|
||||
DuplicateList::iterator eachGeom(duplicateList.begin()+1);
|
||||
// until all geometries have been checked or _targetMaximumNumberOfVertices is reached
|
||||
for (;eachGeom!=duplicateList.end(); ++eachGeom)
|
||||
for(;eachGeom!=duplicateList.end(); ++eachGeom)
|
||||
{
|
||||
unsigned int numAddVertices((*eachGeom)->getVertexArray() ? (*eachGeom)->getVertexArray()->getNumElements() : 0);
|
||||
if (numVertices+numAddVertices<_targetMaximumNumberOfVertices)
|
||||
if ((numVertices+numAddVertices)>_targetMaximumNumberOfVertices)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user