Using CUDA to compute Julia fractal, drawing using OpenGL, use win32 for touch input
Rendering at 4K, each pixel compute using 1200 iterations, running at 10-15fps on RTX4090
This version use CUDA/OpenGL interop to draw the result as a full screen texture quad. I am also using shader.h and some other gl code snippets from learnopengl.com by Joey de Vries to init some shader codes.
The code uses touch input. You can add glfw code for keyboard and mouse inputs
move one finger to pan
move two fingers up and down to zoom
move three fingers to change seed
Library used
- GLFW
- glew
- stb_image
- GLM please put it in the includes folder. get it here https://github.com/g-truc/glm
The Julia CUDA code is based on the code from "CUDA by examples" book by Jason Sanders and Edward Kandrot.
Shader.h is from learnopengl.com by Joey de Vries