diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index c7e9faa96..f5181f87a 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -2141,11 +2141,11 @@ unsigned int _computeNumberOfPrimtives(const osg::Geometry& geom) unsigned int primLength; switch(mode) { - case(GL_POINTS): primLength=1; break; - case(GL_LINES): primLength=2; break; - case(GL_TRIANGLES): primLength=3; break; - case(GL_QUADS): primLength=4; break; - default: primLength=0; break; // compute later when =0. + case(GL_POINTS): primLength=1; osg::notify(osg::INFO)<<"prim=GL_POINTS"<getNumIndices()/primLength; + if (primLength==0) { totalNumberOfPrimitives += 1; osg::notify(osg::INFO)<<" totalNumberOfPrimitives="<getNumIndices()/primLength; osg::notify(osg::INFO)<<" primitiveset->getNumIndices()="<getNumIndices()<<" totalNumberOfPrimitives="<