mirror of
https://github.com/MartinOpat/cuda-based-raytrace.git
synced 2025-06-07 02:13:10 +02:00
feat (wip): real-time gui with rendering in opengl
This commit is contained in:
33
src/illumination/Raycaster.h
Normal file
33
src/illumination/Raycaster.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef RAYCASTER_H
|
||||
#define RAYCASTER_H
|
||||
|
||||
// #include "Camera.h"
|
||||
#include "cuda_runtime.h"
|
||||
#include "FrameBuffer.h"
|
||||
#include "linalg/linalg.h"
|
||||
|
||||
// #include <thrust/device_ptr.h>
|
||||
|
||||
__global__ void raycastKernel(float* volumeData, unsigned char* framebuffer);
|
||||
|
||||
struct Raycaster {
|
||||
|
||||
// thrust::device_ptr<Camera*> d_camera;
|
||||
// CameraInfo camera_info;
|
||||
|
||||
cudaGraphicsResource_t resources;
|
||||
FrameBuffer* fb;
|
||||
|
||||
int w;
|
||||
int h;
|
||||
|
||||
Raycaster() {};
|
||||
Raycaster(cudaGraphicsResource_t resources, int nx, int ny);
|
||||
// ~Raycaster();
|
||||
|
||||
void set_camera(Vec3 position, Vec3 forward, Vec3 up);
|
||||
void render();
|
||||
void resize(int nx, int ny);
|
||||
// void raycastKernel(float* volumeData, unsigned char* framebuffer); // TODO: proper framebuffer class
|
||||
};
|
||||
#endif // RAYCASTER_H
|
||||
Reference in New Issue
Block a user