summaryrefslogtreecommitdiff
path: root/scene.c
diff options
context:
space:
mode:
Diffstat (limited to 'scene.c')
-rw-r--r--scene.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene.c b/scene.c
index df110c7..4427835 100644
--- a/scene.c
+++ b/scene.c
@@ -28,6 +28,7 @@ triangulate(OBJElem **newe, OBJElem *e)
idxtab = &e->indextab[OBJVGeometric];
newe[nt++] = emalloc(sizeof **newe);
newe[nt-1]->type = OBJEFace;
+ newe[nt-1]->mtl = e->mtl;
newidxtab = &newe[nt-1]->indextab[OBJVGeometric];
newidxtab->nindex = 3;
newidxtab->indices = emalloc(newidxtab->nindex*sizeof(*newidxtab->indices));