fix: stuff not actually rendering (pretty important)

This commit is contained in:
2025-01-08 00:42:36 +01:00
parent d5a426e0c5
commit ff7638a245
6 changed files with 11 additions and 17 deletions

View File

@@ -2,11 +2,7 @@
#include "linalg/linalg.h"
__host__ FrameBuffer::FrameBuffer(unsigned int w, unsigned int h) : w(w), h(h) {
this->buffer_size = w*h*sizeof(unsigned int);
cudaMalloc((void**)&this->buffer, this->buffer_size);
cudaMemset(this->buffer, 0, this->buffer_size);
}
__host__ FrameBuffer::FrameBuffer(unsigned int w, unsigned int h) : w(w), h(h) {}
__device__ void FrameBuffer::writePixel(int x, int y, float r, float g, float b) {
int i = y * this->w + x;