aboutsummaryrefslogtreecommitdiff
path: root/raytracing/main.cc
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-03-09 21:49:43 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-03-09 21:49:43 +0800
commit99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5 (patch)
treea5752bac23c6c1cbfb23130e2e51c1e1155723ec /raytracing/main.cc
parent82be1151b5c9e49ccba238ec6e4b18a2cb8fb23d (diff)
downloadrcc-project-99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5.tar.gz
rcc-project-99ac5b94e40b1b95be6ebc061f6dcee4d4dcfed5.tar.xz
Establish a well-structured modern C++ project architecture
Focus on code quality: Treat strict warnings as errors, memory checks with Sanitizers, Clang formatting and static analysis Performance optimization: LTO, ccache
Diffstat (limited to 'raytracing/main.cc')
-rw-r--r--raytracing/main.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/raytracing/main.cc b/raytracing/main.cc
deleted file mode 100644
index e9d2e88..0000000
--- a/raytracing/main.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <iostream>
-#include "vec3.h"
-#include "color.h"
-
-int main() {
- // Image
-
- int image_width = 256;
- int image_height = 256;
-
- // Render
-
- std::cout << "P3\n" << image_width << " " << image_height << "\n255\n";
- for (int j = 0; j < image_height; j++)
- {
- std::clog << "\rScanlines remaining: " << (image_height - j) << ' ' << std::flush;
- for (int i = 0; i < image_width; i++)
- {
- auto pixel_color = color(double(i) / (image_width - 1), double(j) / (image_height - 1), 0);
- write_color(std::cout, pixel_color);
- }
- }
- std::clog << "\rDone. \n";
- return 0;
-} \ No newline at end of file