summaryrefslogtreecommitdiff
path: root/test/raytracer/eval.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/raytracer/eval.h')
-rw-r--r--test/raytracer/eval.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/raytracer/eval.h b/test/raytracer/eval.h
new file mode 100644
index 0000000..610b5d9
--- /dev/null
+++ b/test/raytracer/eval.h
@@ -0,0 +1,18 @@
+/* Evaluator for GML */
+
+struct closure {
+ struct array * code;
+ struct array * env;
+};
+
+struct surface_characteristics {
+ flt x, y, z;
+ flt kd;
+ flt ks;
+ flt phong;
+};
+
+void execute_program(struct array * toklist);
+
+void surface_function(struct closure * clos, int face, flt u, flt v,
+ /*out*/ struct surface_characteristics * sc);