SDL_GETPIXELFORMATFROMGPUTEXTUREFORMAT(3)
π SDL_GetPixelFormatFromGPUTextureFormat π
okay bestie, so this one lives in the SDL3 functions manual (that's the SDL_GetPixelF...TextureFormat(3) page, the name got a lil truncated in the header, no biggie, she's still iconic) π
β¨ NAME β¨
SDL_GetPixelFormatFromGPUTextureFormat β get the SDL pixel format that corresponds to a GPU texture format. like, you got a GPU texture format and you wanna know which pixel format matches it. that's the whole gig π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_gpu.h>
SDL_PixelFormat SDL_GetPixelFormatFromGPUTextureFormat(SDL_GPUTextureFormat format);
β¨ FUNCTION PARAMETERS β¨
formatβ a texture format. that's it, that's the input π¦
β¨ RETURN VALUE β¨
She hands you back the corresponding pixel format, and if there's genuinely no corresponding pixel format to be found? You get SDL_PIXELFORMAT_UNKNOWN instead. not me getting the unknown format π but fr, that's the signal that nothing matched.
β¨ AVAILABILITY β¨
This function is available since SDL 3.4.0. so if you're on an older SDL she simply isn't there yet, vibe check your version first πΈ
and that's the whole page, bestie, short and slay. this manual is brought to you by the Simple Directmedia Layer legends, SDL 3.4.18 era, SDL_GetPixelF...TextureFormat(3) β mwah, obsessed with her πβ¨π«Ά
π¦ 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