/sdl3-cs-triangle

Just seeing how difficult it is to render a triangle with SDL3 in C#.

Primary LanguageC#zlib LicenseZlib

sdl3-cs-triangle

triangle

Just seeing how difficult it is to render a triangle with SDL3 in C#.

Ensure the .NET SDK is installed:

winget install Microsoft.DotNet.SDK.9

then

dotnet run

This uses https://github.com/edwardgushchin/SDL3-CS instead of https://github.com/bottlenoselabs/SDL3-cs because the former is more up-to-date (at the time of writing) and is more explicit about its loop.

This is a port of https://github.com/TheSpydog/SDL_gpu_examples/blob/main/Examples/TriangleMSAA.c.

To compile the shaders,

cd Content\Shaders\Source
bash # assuming WSL
./download.sh # only needs to be done once; downloads SDL_shadercross
./compile.sh