aboutsummaryrefslogtreecommitdiff
path: root/scene.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-02-21 12:34:36 +0000
committerrodri <rgl@antares-labs.eu>2024-02-21 12:34:36 +0000
commit22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db (patch)
treeefd2aecf91466e84117106355f5ddac167693026 /scene.c
parentaada4866f55485246e4e42f68f7402f022b687a2 (diff)
downloadlibgraphics-22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db.tar.gz
libgraphics-22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db.tar.bz2
libgraphics-22e341ed6fc92f7bd547b0e6b1d5501d3eb9a7db.zip
add initial support for OBJMaterial properties.
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));