From 3fefc3cc7e0eb7dd4cb9528c87dd03d97bc24d08 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 12 Dec 2003 16:34:46 +0000 Subject: [PATCH] Removed comments, and move the tri stipper slightly later in the code to apply it on all geometries. --- src/osgPlugins/obj/ReaderWriterOBJ.cpp | 11 +++-------- src/osgPlugins/obj/glm.cpp | 4 ---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/osgPlugins/obj/ReaderWriterOBJ.cpp b/src/osgPlugins/obj/ReaderWriterOBJ.cpp index d5bcc4a15..00978120d 100644 --- a/src/osgPlugins/obj/ReaderWriterOBJ.cpp +++ b/src/osgPlugins/obj/ReaderWriterOBJ.cpp @@ -591,18 +591,10 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable_useSeperateIndices(GLMmodel* obj, G if (indexArraysEqual) { - //std::cout<<"Use draw element"<addPrimitiveSet(new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES,vertexIndices->begin(),vertexIndices->end())); - - osgUtil::TriStripVisitor tsv; - tsv.stripify(*geom); - } else { - //std::cout<<"Use sepeate indices arrays"<setVertexIndices(vertexIndices.get()); if (needColors) geom->setColorIndices(vertexIndices.get()); if (needNormals) geom->setNormalIndices(normalIndices.get()); @@ -613,6 +605,9 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable_useSeperateIndices(GLMmodel* obj, G } + osgUtil::TriStripVisitor tsv; + tsv.stripify(*geom); + if (obj->numnormals==0) { osgUtil::SmoothingVisitor tsv; diff --git a/src/osgPlugins/obj/glm.cpp b/src/osgPlugins/obj/glm.cpp index 31991ea97..ad7c58ce1 100644 --- a/src/osgPlugins/obj/glm.cpp +++ b/src/osgPlugins/obj/glm.cpp @@ -277,11 +277,9 @@ _glmReadMTLTextureOptions(GLMmodel* model, unsigned int materialIndex, char* lin { char *token; char seps[] = " \t\n\r\f\v"; - std::cout<<"line ["<materials[materialIndex].textureName = strdup(token); - std::cout<<"token ["<materials[materialIndex].textureName<<"]"<