SDL_ISPIXELFORMAT_PACKED(3)
π SDL_ISPIXELFORMAT_PACKED π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we vibe-check pixel formats β¨
β¨ NAME β¨
SDL_ISPIXELFORMAT_PACKED β a macro that tells you whether an SDL_PixelFormat is a packed format π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_pixels.h>
#define SDL_ISPIXELFORMAT_PACKED(format) \
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
π¦ DESCRIPTION π¦
So here's the tea, bestie: this macro double-evaluates its parameter π like it literally looks at your argument more than once. So do NOT hand it an expression with side-effects. Just don't. It's giving chaos and we are not here for that. π
π MACRO PARAMETERS π
formatβ anSDL_PixelFormatyou want to check, boo π«Ά
β RETURN VALUE β
Returns true if the format is packed, false otherwise. Simple. Iconic. No notes. π
π THREAD SAFETY π
It is safe to call this macro from any thread. main character energy across every core, periodt π
π« AVAILABILITY π«
This macro is available since SDL 3.2.0 β she's been here, she's been serving β¨
and that's the whole page, bestie!! this one came to you from Simple Directmedia Layer, living in SDL 3.4.18 era, filed under SDL_ISPIXELFORMAT_PACKED(3) π go forth and check your pixel formats, ily, bye πβ¨π¦
π¦ 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