Fix to order of materials
This commit is contained in:
parent
87a2a282be
commit
dc0bc861b2
@ -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);
|
||||
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;
|
||||
group->material = material;
|
||||
|
||||
break;
|
||||
case 'o': /* group */
|
||||
|
Loading…
Reference in New Issue
Block a user