summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-10-07 10:46:58 +0000
committerrodri <rgl@antares-labs.eu>2024-10-07 10:46:58 +0000
commitb8dacd35abcede65c0cd415e5fd41b3f8f75d4f3 (patch)
treea88d17f1f9fedec6bd1e1b479fed0086dedde5dc
parent727cb178cfbc31d46098bcbb46ebf2452527025a (diff)
download3dee-b8dacd35abcede65c0cd415e5fd41b3f8f75d4f3.tar.gz
3dee-b8dacd35abcede65c0cd415e5fd41b3f8f75d4f3.tar.bz2
3dee-b8dacd35abcede65c0cd415e5fd41b3f8f75d4f3.zip
obj: refer to the geometric vertex table when triangulating.
-rw-r--r--obj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/obj.c b/obj.c
index 7095e58..403e547 100644
--- a/obj.c
+++ b/obj.c
@@ -19,11 +19,11 @@ static int
triangulate(OBJElem **newe, OBJElem *e)
{
OBJIndexArray *newidxtab;
- OBJIndexArray *idxtab;
+ OBJIndexArray *gidxtab, *idxtab;
int i;
- idxtab = &e->indextab[OBJVGeometric];
- for(i = 0; i < idxtab->nindex-2; i++){
+ gidxtab = &e->indextab[OBJVGeometric];
+ for(i = 0; i < gidxtab->nindex-2; i++){
idxtab = &e->indextab[OBJVGeometric];
newe[i] = emalloc(sizeof **newe);
memset(newe[i], 0, sizeof **newe);