Removed debug picture exportanig

This commit is contained in:
Martin Opat 2025-01-11 15:11:27 +01:00
parent 3313e8cf84
commit 079e0797e9
1 changed files with 11 additions and 11 deletions

View File

@ -64,17 +64,17 @@ int Window::init(float* data) {
if (init_quad(data)) return -1; if (init_quad(data)) return -1;
this->last_frame = std::chrono::steady_clock::now(); this->last_frame = std::chrono::steady_clock::now();
// TODO: These changes are temporary while (!glfwWindowShouldClose(window)) {
// while (!glfwWindowShouldClose(window)) { Window::tick();
}
// TODO: Remove this, this was just for ray-casting debug
// Window::tick(); // Window::tick();
// } // Window::tick();
Window::tick(); // // Save the image
Window::tick(); // unsigned char* pixels = new unsigned char[this->w * this->h * 3];
// Save the image // glReadPixels(0, 0, this->w, this->h, GL_RGB, GL_UNSIGNED_BYTE, pixels);
unsigned char* pixels = new unsigned char[this->w * this->h * 3]; // saveImage2("output.ppm", pixels, this->w, this->h);
glReadPixels(0, 0, this->w, this->h, GL_RGB, GL_UNSIGNED_BYTE, pixels); // delete[] pixels;
saveImage2("output.ppm", pixels, this->w, this->h);
delete[] pixels;
Window::free(data); Window::free(data);
return 0; return 0;