From f3d21bd285184457d58879af848497b699b707d0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 25 May 2013 10:09:23 +0000 Subject: [PATCH] From Farshid Lashkari, " small update to TangentSpaceGenerator to support QUAD_STRIP primitive types." --- src/osgUtil/TangentSpaceGenerator.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/osgUtil/TangentSpaceGenerator.cpp b/src/osgUtil/TangentSpaceGenerator.cpp index 15bb3eaaa..57edb4e63 100644 --- a/src/osgUtil/TangentSpaceGenerator.cpp +++ b/src/osgUtil/TangentSpaceGenerator.cpp @@ -103,6 +103,32 @@ void TangentSpaceGenerator::generate(osg::Geometry *geo, int normal_map_tex_unit } break; + case osg::PrimitiveSet::QUAD_STRIP: + if (pset->getType() == osg::PrimitiveSet::DrawArrayLengthsPrimitiveType) { + osg::DrawArrayLengths *dal = static_cast(pset); + unsigned int j = 0; + for (osg::DrawArrayLengths::const_iterator pi=dal->begin(); pi!=dal->end(); ++pi) { + unsigned int iN = static_cast(*pi-2); + for (i=0; igetType() == osg::PrimitiveSet::DrawArrayLengthsPrimitiveType) {