From dc0bc861b26f04d9e875791cc4163f2d431c3e05 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 16 Aug 2004 14:03:17 +0000 Subject: [PATCH] Fix to order of materials --- src/osgPlugins/obj/glm.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/osgPlugins/obj/glm.cpp b/src/osgPlugins/obj/glm.cpp index 848f0c53f..f936965c4 100644 --- a/src/osgPlugins/obj/glm.cpp +++ b/src/osgPlugins/obj/glm.cpp @@ -838,12 +838,9 @@ _glmSecondPass(GLMmodel* model, FILE* file) fgets(buf, sizeof(buf), file); sscanf(buf, "%s %s", buf, buf); - /*group->material =*/ material = _glmFindMaterial(model, buf); - - // a hack by Robert Osfield to account for usemtl being infront - // or the group, or after - but only one line after. - // original code always assigned material to current group. - if (previousLineWas_g || firstGroup) group->material = material; + material = _glmFindMaterial(model, buf); + + group->material = material; break; case 'o': /* group */