summaryrefslogtreecommitdiffstats
path: root/tests/raytrace.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-14 01:48:35 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-14 01:48:35 +0000
commit3ce0bfcd0e16d909b7495f07c9e8a82e4781ee88 (patch)
tree98ba25a085f0a06ab41a152fff3f065909611a91 /tests/raytrace.c
parent9f8055ac23b829babe5ed469251435b64ac82831 (diff)
downloaddimension-3ce0bfcd0e16d909b7495f07c9e8a82e4781ee88.tar.xz
Make raytracing engine multi-threaded.
Diffstat (limited to 'tests/raytrace.c')
-rw-r--r--tests/raytrace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/raytrace.c b/tests/raytrace.c
index 1fbf837..de1bc89 100644
--- a/tests/raytrace.c
+++ b/tests/raytrace.c
@@ -25,7 +25,7 @@
int main() {
FILE *file;
dmnsn_scene *scene;
- dmnsn_object *object;
+ dmnsn_object *cube;
dmnsn_sRGB sRGB;
dmnsn_color color;
dmnsn_matrix trans;
@@ -58,14 +58,15 @@ int main() {
color.filter = 0.1;
scene->background = color;
- object = dmnsn_new_cube();
- dmnsn_array_push(scene->objects, &object);
+ cube = dmnsn_new_cube();
+ dmnsn_array_push(scene->objects, &cube);
dmnsn_raytrace_scene(scene);
file = fopen("raytrace.png", "wb");
dmnsn_png_write_canvas(scene->canvas, file);
+ dmnsn_delete_cube(cube);
dmnsn_delete_perspective_camera(scene->camera);
dmnsn_delete_canvas(scene->canvas);
dmnsn_delete_scene(scene);