thatcosmonaut / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
1 stars 2 forks source link

Add GPU spinning cube test #4

Closed TheSpydog closed 2 months ago

TheSpydog commented 2 months ago

This PR adds a gltest-like test program for SDL_GPU, copied mostly from Ryan's equivalent test on his GPU branch, but adjusted for our API.

The only remaining task is to get the prebuilt Metal shaders generated.

flibitijibibo commented 2 months ago

Looks okay to me - they might not like the use_gpu bool but that might be a good conversation starter for getting rid of those window flags to begin with, since they don't really do anything anymore...

flibitijibibo commented 2 months ago

Get the selected backend from SDLTest_CommonInit so we can pick the right shaders

We can use SDL_GpuGetBackend to avoid digging into CommonInit. (Someone remind me to try and get the Metal and Vulkan window flags removed so we don't need SelectBackend anymore...)