diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/raytrace.c | 4 | ||||
-rw-r--r-- | tests/raytracexx.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/raytrace.c b/tests/raytrace.c index 5dab164..fe98bfc 100644 --- a/tests/raytrace.c +++ b/tests/raytrace.c @@ -38,8 +38,8 @@ main() { } /* Optimize the canvas for PNG export */ - if (dmnsn_png_optimize_canvas(canvas) != 0) { - dmnsn_delete_canvas(canvas); + if (dmnsn_png_optimize_canvas(scene->canvas) != 0) { + dmnsn_delete_default_scene(scene); fprintf(stderr, "--- Couldn't optimize canvas for PNG! ---\n"); return EXIT_FAILURE; } diff --git a/tests/raytracexx.cpp b/tests/raytracexx.cpp index 03de066..d681f58 100644 --- a/tests/raytracexx.cpp +++ b/tests/raytracexx.cpp @@ -28,7 +28,10 @@ main() { // Set the resilience low for tests resilience(SEVERITY_LOW); + // Get the default test scene Scene scene = Tests::default_scene(); + + std::ofstream file("raytracexx.png"); PNG_Writer writer(scene.canvas(), file); // Render the scene @@ -39,7 +42,6 @@ main() { } // Write the canvas - std::ofstream file("raytracexx.png"); Progress progress = writer.write_async(); std::cout << "Writing PNG file: " << progress << std::endl; |