diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-06-26 15:30:48 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-06-26 15:30:48 +0000 |
commit | afd221bada70a5bcf0a59faefc5cd390538e33d9 (patch) | |
tree | 8f5bb3643b2b49cd09609c102ab54d26383c987a /tests/raytrace.c | |
parent | 742c3b57c1f8e5d5666db5f20c7fa8c8a8c8e413 (diff) | |
download | dimension-afd221bada70a5bcf0a59faefc5cd390538e33d9.tar.xz |
New raytrace.h header, with async raytrace interface.
Diffstat (limited to 'tests/raytrace.c')
-rw-r--r-- | tests/raytrace.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/raytrace.c b/tests/raytrace.c index bb26f58..7ea28da 100644 --- a/tests/raytrace.c +++ b/tests/raytrace.c @@ -24,6 +24,7 @@ int main() { + dmnsn_progress *progress; FILE *file; dmnsn_scene *scene; dmnsn_object *sphere, *cube; @@ -71,10 +72,14 @@ main() { ); dmnsn_array_push(scene->objects, &cube); - dmnsn_raytrace_scene(scene); + progress = dmnsn_raytrace_scene_async(scene); + progressbar("Raytracing scene: ", progress); + dmnsn_finish_progress(progress); file = fopen("raytrace.png", "wb"); - dmnsn_png_write_canvas(scene->canvas, file); + progress = dmnsn_png_write_canvas_async(scene->canvas, file); + progressbar("Writing PNG file: ", progress); + dmnsn_finish_progress(progress); dmnsn_delete_cube(cube); dmnsn_delete_sphere(sphere); |