From 079e0797e9d3588c586c1dcb6e5b000baf8dd7a2 Mon Sep 17 00:00:00 2001 From: Martin Opat Date: Sat, 11 Jan 2025 15:11:27 +0100 Subject: [PATCH] Removed debug picture exportanig --- src/gui/MainWindow.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 3ab2dc6..f7700a9 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -64,17 +64,17 @@ int Window::init(float* data) { if (init_quad(data)) return -1; this->last_frame = std::chrono::steady_clock::now(); - // TODO: These changes are temporary - // while (!glfwWindowShouldClose(window)) { - // Window::tick(); - // } - Window::tick(); - Window::tick(); - // Save the image - unsigned char* pixels = new unsigned char[this->w * this->h * 3]; - glReadPixels(0, 0, this->w, this->h, GL_RGB, GL_UNSIGNED_BYTE, pixels); - saveImage2("output.ppm", pixels, this->w, this->h); - delete[] pixels; + while (!glfwWindowShouldClose(window)) { + Window::tick(); + } + // TODO: Remove this, this was just for ray-casting debug + // Window::tick(); + // Window::tick(); + // // Save the image + // unsigned char* pixels = new unsigned char[this->w * this->h * 3]; + // glReadPixels(0, 0, this->w, this->h, GL_RGB, GL_UNSIGNED_BYTE, pixels); + // saveImage2("output.ppm", pixels, this->w, this->h); + // delete[] pixels; Window::free(data); return 0;