From a78e8d2b6b0d92672c15c78e1f679451cc5af65c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Apr 2007 19:51:20 +0000 Subject: [PATCH] Fixed the handle of triangle fan. --- src/osgUtil/TangentSpaceGenerator.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/osgUtil/TangentSpaceGenerator.cpp b/src/osgUtil/TangentSpaceGenerator.cpp index 0d4774324..8f6b14f20 100644 --- a/src/osgUtil/TangentSpaceGenerator.cpp +++ b/src/osgUtil/TangentSpaceGenerator.cpp @@ -55,12 +55,12 @@ void TangentSpaceGenerator::generate(osg::Geometry *geo, int normal_map_tex_unit } } - unsigned i; // VC6 doesn't like for-scoped variables + unsigned int i; // VC6 doesn't like for-scoped variables - for (unsigned pri=0; prigetNumPrimitiveSets(); ++pri) { + for (unsigned int pri=0; prigetNumPrimitiveSets(); ++pri) { osg::PrimitiveSet *pset = geo->getPrimitiveSet(pri); - unsigned N = pset->getNumIndices(); + unsigned int N = pset->getNumIndices(); switch (pset->getMode()) { @@ -80,9 +80,9 @@ void TangentSpaceGenerator::generate(osg::Geometry *geo, int normal_map_tex_unit case osg::PrimitiveSet::TRIANGLE_STRIP: if (pset->getType() == osg::PrimitiveSet::DrawArrayLengthsPrimitiveType) { osg::DrawArrayLengths *dal = static_cast(pset); - unsigned j = 0; + unsigned int j = 0; for (osg::DrawArrayLengths::const_iterator pi=dal->begin(); pi!=dal->end(); ++pi) { - unsigned iN = static_cast(*pi-2); + unsigned int iN = static_cast(*pi-2); for (i=0; igetType() == osg::PrimitiveSet::DrawArrayLengthsPrimitiveType) { osg::DrawArrayLengths *dal = static_cast(pset); - unsigned j = 0; + unsigned int j = 0; for (osg::DrawArrayLengths::const_iterator pi=dal->begin(); pi!=dal->end(); ++pi) { - unsigned iN = static_cast(*pi-2); + unsigned int iN = static_cast(*pi-2); for (i=0; i