summaryrefslogtreecommitdiffstats
path: root/tests/raytracexx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/raytracexx.cpp')
-rw-r--r--tests/raytracexx.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/raytracexx.cpp b/tests/raytracexx.cpp
index 2c1d3c9..e3d55cf 100644
--- a/tests/raytracexx.cpp
+++ b/tests/raytracexx.cpp
@@ -33,8 +33,7 @@ main() {
background.filter(0.1);
// Canvas
- std::ofstream file("raytracexx.png");
- PNG_Canvas canvas(768, 480, file);
+ Canvas canvas(768, 480);
// Camera
Perspective_Camera camera(
@@ -65,8 +64,10 @@ main() {
}
// Write the canvas
- Progress wprogress = canvas.write_async();
- std::cout << "Writing PNG file: " << wprogress << std::endl;
+ std::ofstream file("raytracexx.png");
+ PNG_Writer writer(canvas, file);
+ Progress progress = writer.write_async();
+ std::cout << "Writing PNG file: " << progress << std::endl;
return EXIT_SUCCESS;
}