From 3155c6737832c54310c70ecaaf8667d0362de5e8 Mon Sep 17 00:00:00 2001 From: rodri Date: Thu, 26 Sep 2024 15:22:02 +0000 Subject: implement a parser for a model(6). get rid of the libobj dependency. --- scene.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scene.c') diff --git a/scene.c b/scene.c index 8971c30..1621be2 100644 --- a/scene.c +++ b/scene.c @@ -4,7 +4,6 @@ #include #include #include -#include "libobj/obj.h" #include "graphics.h" #include "internal.h" @@ -13,7 +12,7 @@ model_addprim(Model *m, Primitive p) { m->prims = erealloc(m->prims, ++m->nprims*sizeof(*m->prims)); m->prims[m->nprims-1] = p; - return 0; + return m->nprims-1; } static int @@ -21,7 +20,7 @@ model_addmaterial(Model *m, Material mtl) { m->materials = erealloc(m->materials, ++m->nmaterials*sizeof(*m->materials)); m->materials[m->nmaterials-1] = mtl; - return 0; + return m->nmaterials-1; } Model * -- cgit v1.2.3