Fix to order of materials

This commit is contained in:
Robert Osfield 2004-08-16 14:03:17 +00:00
parent 87a2a282be
commit dc0bc861b2

View File

@ -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 */