diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-09 00:32:30 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-09 00:32:30 +0000 |
commit | 9f1b759e2fac0b15a7ef5a7a527ba66dbdc319b6 (patch) | |
tree | 2bd10bdeca7c6b1a9d11a4ef719e13b3d8ed999b /tests/gl.c | |
parent | 533fa6d364105c1f6438156d969e48aa9199cddc (diff) | |
download | dimension-9f1b759e2fac0b15a7ef5a7a527ba66dbdc319b6.tar.xz |
Enable drawing progres bars in the background.
Diffstat (limited to 'tests/gl.c')
-rw-r--r-- | tests/gl.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -24,10 +24,9 @@ int main() { dmnsn_display *display; - dmnsn_progress *progress; + dmnsn_progress *progress, *barprogress; dmnsn_scene *scene; dmnsn_canvas *canvas; - unsigned int i; /* Set the resilience low for tests */ dmnsn_set_resilience(DMNSN_SEVERITY_LOW); @@ -64,6 +63,8 @@ main() { return EXIT_FAILURE; } + barprogress = dmnsn_progressbar_async("Raytracing scene: ", progress); + /* Display the scene as it's rendered */ while (dmnsn_get_progress(progress) < 1.0) { if (dmnsn_gl_write_canvas(scene->canvas) != 0) { @@ -75,6 +76,8 @@ main() { dmnsn_display_flush(display); } + dmnsn_finish_progress(barprogress); + if (dmnsn_finish_progress(progress) != 0) { dmnsn_delete_display(display); dmnsn_delete_default_scene(scene); |