or: How To Get Started With GPU Programming for Beginners, With SDL3's GPU API.
This repository contains both the guide/book in the docs directory,
as well as the final code for each chapter that you can look at when you're stuck,
and also clone and run yourself.
First, clone this repository recursively:
git clone --recursive https://github.com/TechnicJelle/GPUForBeginners.gitor
git clone --recursive git@github.com:TechnicJelle/GPUForBeginners.gitNow that the code has been downloaded, you also need the "SDL_shadercross" shader compiler.
You can download it from the Actions tab here:
github.com/libsdl-org/SDL_shadercross
Make sure to get the latest successful build and to download the artifact for your specific platform.
You can unpack the archive you downloaded somewhere and add its bin/ directory to your PATH.
CMake should then automatically detect and use it.
Alternatively, you can unpack the archive into the root of this repository. CMake should then automatically detect and use it.
Then, either open the directory in an IDE and let it import. You can then select the chapter you want to see and click the Run button.
You can also run cmake from the command-line instead of using an IDE:
cmake -S . -B build -G Ninja
cmake --build build --parallel(Ninja seems to be required, as normal Unix Makefiles fail to build.)
Or build a single chapter:
cmake --build build --target Chapter01You will then find the executables in the build/ directory.