X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=scene.c;h=1493e3163c9a781b7def812d573c392736bbdda5;hp=c7c4a3274b2e17db0cd89a7313d566dd30c3b818;hb=bc662e293c854e1bdc9d46e9a410fe220247e6d4;hpb=07083c8dfbbd4fe48e84d86ce8d7e44e0719b84a diff --git a/scene.c b/scene.c index c7c4a32..1493e31 100644 --- a/scene.c +++ b/scene.c @@ -170,8 +170,9 @@ static int _model_set_colors(model_t* m, FILE* file) } color_t color = color_new((colorchan_t)r, (colorchan_t)g, (colorchan_t)b, (colorchan_t)a); - for (const list_t* i = model_geometry(m); i; i = i->link) { - tri_t* t = (tri_t*)i->val; + + array_it_t it = array_begin(model_geometry(m)); + for (tri_t* t; t = array_it_tri_next(&it);) { t->a.c = color; t->b.c = color; t->c.c = color; @@ -308,3 +309,6 @@ raster_t* scene_render(scene_t* s) return p; } + +#include "opengl.c" +