From 0fac56f56a2d4da5142145402a76f5aa2b4c57ee Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 4 Jun 2004 08:13:36 +0000 Subject: [PATCH] From Max Behensky, fixes to the computation of the number of primitives --- src/osg/Geometry.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 117e30a3d..c7e9faa96 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -2161,14 +2161,14 @@ unsigned int _computeNumberOfPrimtives(const osg::Geometry& geom) ++primItr) { if (primLength==0) totalNumberOfPrimitives += 1; - else totalNumberOfPrimitives = *primItr/primLength; + else totalNumberOfPrimitives += *primItr/primLength; } break; } default: { if (primLength==0) totalNumberOfPrimitives += 1; - else totalNumberOfPrimitives = primitiveset->getNumIndices()/primLength; + else totalNumberOfPrimitives += primitiveset->getNumIndices()/primLength; } } @@ -2314,7 +2314,7 @@ void _computeCorrectBindingsAndArraySizes(const osg::Geometry& geom, A& arrayDat { notify(WARN)<<"Warning: in osg::Geometry::computeCorrectBindingsAndArraySizes() "<