From 093200a449ea38952de52012e324036c106e294b Mon Sep 17 00:00:00 2001 From: Brett Weiland Date: Mon, 27 May 2024 20:56:59 -0500 Subject: boutta switch away from templates --- main.cu | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'main.cu') diff --git a/main.cu b/main.cu index 4225b09..4aa6cbb 100644 --- a/main.cu +++ b/main.cu @@ -3,10 +3,9 @@ #include #include +#include "kernel.cuh" #include "raylib.h" -__global__ void test_image(uint8_t *image); - int main() { //bluuuuugh i'll figure out occupancy later, this res are easy //calculated manually for gtx1060 with 20 SM, 1024 threads/SM @@ -17,7 +16,8 @@ int main() { uint8_t *image_d; Color texture_data[res_x * res_y]; - + SetTargetFPS(10); + //see if GPU is connected (my egpu is finicky) { @@ -36,16 +36,10 @@ int main() { Image image = GenImageColor(res_x, res_y, BLUE); Texture tex = LoadTextureFromImage(image); - - - - - //if(!IsWindowFullscreen()) ToggleFullscreen(); - while(!WindowShouldClose()) { //cuda stuff cudaMalloc((void **)&image_d, res_x * res_y * sizeof(Color)); - test_image<<>>(image_d); + render<<>>(image_d); cudaDeviceSynchronize(); cudaMemcpy(texture_data, (void **)image_d, res_x * res_y * sizeof(Color), cudaMemcpyDeviceToHost); -- cgit v1.2.3