ref: b8dacd35abcede65c0cd415e5fd41b3f8f75d4f3
parent: 727cb178cfbc31d46098bcbb46ebf2452527025a
author: rodri <rgl@antares-labs.eu>
date: Mon Oct 7 06:46:58 EDT 2024
obj: refer to the geometric vertex table when triangulating.
--- a/obj.c
+++ b/obj.c
@@ -19,11 +19,11 @@
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);