mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
fix: stuff not actually rendering (pretty important)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user