reprap: c3 update
[simavr] / examples / board_reprap / src / c3 / c3context.c
index 6c28758..0c0f26a 100644 (file)
@@ -48,7 +48,16 @@ c3context_init(
 }
 
 void
-c3context_prepare(
+c3context_dispose(
+               c3context_p c)
+{
+       c3object_dispose(c->root);
+       c3geometry_array_free(&c->projected);
+       free(c);
+}
+
+void
+c3context_project(
                c3context_p c)
 {
        if (!c->root || !c->root->dirty)
@@ -64,9 +73,9 @@ void
 c3context_draw(
                c3context_p c)
 {
-       c3context_prepare(c);
+       c3context_project(c);
        for (int gi = 0; gi < c->projected.count; gi++) {
                c3geometry_p g = c->projected.e[gi];
-               C3_DRIVER(c, geometry_draw, g);
+               c3geometry_draw(g);
        }
 }