SDL_PIXELORDER(3)
π SDL_PIXELORDER π
okay bestie, welcome to SDL_PIXELORDER β a whole macro from the SDL3 FUNCTIONS crew whose entire job is telling you what order your pixels are in. yes really. that's the gig. and honestly? she ate. β¨
πΈ NAME πΈ
SDL_PIXELORDER β a macro to retrieve the order of an SDL_PixelFormat. that's it, that's the whole thing, and she does it flawlessly no cap π
π SYNOPSIS π
#include <SDL3/SDL_pixels.h>
#define SDL_PIXELORDER(format) (((format) >> 20) & 0x0F)
look at her. one line. shifting and masking like a boss. main character energy fr fr π
π¦ DESCRIPTION π¦
so like, the value you get back is usually one from the SDL_BitmapOrder, SDL_PackedOrder, or SDL_ArrayOrder enumerations β which one you're looking at depends on the format type, iykyk. π§
β¨ MACRO PARAMETERS β¨
formatβ anSDL_PixelFormatto check. hand her over and she'll do her lil thing π«Ά
π RETURN VALUE π
returns the order of format. periodt. π
π THREAD SAFETY π
it is safe to call this macro from any thread. go wild, bestie, no locking required, we love a low-maintenance icon β
π AVAILABILITY π
this macro has been available since SDL 3.2.0. she's been here, she's been serving, she's not going anywhere π
lowkey reminder: it's a macro, not a function β so there's no pointer to take, no address to grab, just vibes and bit-shifting ππ
and that's the whole page, bestie!! this lil legend lives in Simple Directmedia Layer, version SDL 3.4.18 β signed, sealed, and slayed on her official man page date πβ¨ bye pookie, go shift some bits π¦
π¦ 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