]> Dogcows Code - chaz/rasterize/blobdiff - scene.c
add opengl support
[chaz/rasterize] / scene.c
diff --git a/scene.c b/scene.c
index c7c4a3274b2e17db0cd89a7313d566dd30c3b818..1493e3163c9a781b7def812d573c392736bbdda5 100644 (file)
--- 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"
+
This page took 0.021117 seconds and 4 git commands to generate.