SDL_GetPixelFormatName(3)
π SDL_GetPixelFormatName(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we learn how to ask a pixel format for its government name π
β¨ NAME β¨
SDL_GetPixelFormatName</puruple> β get the human readable name of a pixel format π
Like, you hand it a pixel format and it hands you back a cute lil string. That's the whole gig. Iconic, honestly.
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_pixels.h>
const char * SDL_GetPixelFormatName(SDL_PixelFormat format);
no cap, that's the whole signature. one function, one arg, one const char * walking back out the door β¨
π¦ FUNCTION PARAMETERS π¦
formatβ the pixel format to query. that's the one you're curious about, bestie, so go ahead and pass it in π«Ά
π RETURN VALUE π
It returns the human readable name of the specified pixel format π
and if the format isn't recognized? it gives you back "SDL_PIXELFORMAT_UNKNOWN" instead. like a little "idk her" but in string form π
π₯ THREAD SAFETY π₯
It is safe to call this function from any thread. yes, literally any. go wild, main character π
β AVAILABILITY β
This function is available since SDL 3.2.0 π
ngl that's the entire page β short and sweet, just like a good group chat message π
Simple Directmedia Layer π SDL 3.4.18 π SDL_GetPixelFormatName(3) β mwah, that's the version and date, thanks for coming to my ted talk, slay, bye bestie π β¨π¦π
π¦ 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