Removed old debug code from back when the pause button was not a thing

This commit is contained in:
Martin Opat 2025-01-15 20:05:36 +01:00
parent 98055642bd
commit c26462165a
1 changed files with 0 additions and 18 deletions

View File

@ -8,16 +8,6 @@
#include "input/Widget.h"
// TODO: Delete
void saveImage2(const char* filename, unsigned char* framebuffer, int width, int height) { // TODO: Figure out a better way to do this
std::ofstream imageFile(filename, std::ios::out | std::ios::binary);
imageFile << "P6\n" << width << " " << height << "\n255\n";
for (int i = 0; i < width * height * 3; i++) {
imageFile << framebuffer[i];
}
imageFile.close();
}
Window::Window(unsigned int w, unsigned int h) {
this->w = w;
this->h = h;
@ -69,14 +59,6 @@ int Window::init(float* data) {
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;