feat: switched to qt and refactored

This commit is contained in:
2025-11-12 10:41:40 +01:00
parent adafae2d84
commit e9e4eed79b
3 changed files with 124 additions and 14 deletions

32
rendertarget.hpp Normal file
View File

@@ -0,0 +1,32 @@
#ifndef RENDERTARGET_H
#define RENDERTARGET_H
#include "fastmath.hpp"
class Rendertarget {
public:
const int width;
const int height;
Rendertarget(int width, int height) : width(width), height(height) {
pixels = new decimal[width * height * 3];
}
void set(int x, int y, vec3 val) {
int start = (width * y + x) * 3;
for (int i = 0; i < 3; i++) {
pixels[start + i] = val[i];
}
}
void get(int x, int y, vec3 *val) {
int start = (width * y + x) * 3;
for (int i = 0; i < 3; i++) {
(*val)[i] = pixels[start + i];
}
}
decimal *pixels;
};
#endif