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