SDL_GetGPUShaderFormats(3)
π SDL_GetGPUShaderFormats π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, page SDL_GetGPUShaderFormats(3), and let me tell you, this one is short but it EATS. π
β¨ NAME β¨
SDL_GetGPUShaderFormats β returns the supported shader formats for this GPU context. like, which shader flavors your driver is actually willing to swallow. no cap. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_gpu.h>
SDL_GPUShaderFormat SDL_GetGPUShaderFormats(SDL_GPUDevice *device);
so you pull in SDL_gpu.h, you hand it a device, and it hands you back an SDL_GPUShaderFormat. that's the whole vibe. π¦
π«Ά FUNCTION PARAMETERS π«Ά
deviceβ a GPU context to query. that's it, that's the whole list, she's low maintenance. β¨
π₯ RETURN VALUE π₯
Returns a bitflag indicating which shader formats the driver is able to consume. so not a single format, a bitflag β it's giving "check the bits, bestie", iykyk. π
ngl, if you were expecting a cute little enum you could just == against, this is your reminder that it's a bitflag. read it like one. π
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on anything older, she simply isn't there. π
and that's the whole page, periodt. π
this little masterpiece lives in the Simple Directmedia Layer collection, sitting pretty at SDL 3.4.18 β so go forth, query your shader formats, and slay responsibly. πππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms