SDL_COLORSPACERANGE(3)
SDL_COLORSPACERANGE π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, we're talking about SDL_COLORSPACERANGE today and it's genuinely such a lil cutie π
β¨ NAME β¨
SDL_COLORSPACERANGE β a macro to retrieve the range of an SDL_Colorspace. that's it. that's the whole job. she's a one-trick pony and she ATE π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_pixels.h>
#define SDL_COLORSPACERANGE(cspace) (SDL_ColorRange)(((cspace) >> 24) & 0x0F)
like look at her. shifting right by 24 and masking with 0x0F. bits getting rearranged like it's nothing π¦ iconic behavior fr fr
β¨ MACRO PARAMETERS β¨
cspaceβ anSDL_Colorspaceto check. that's the one you're interrogating. hand her over and she'll tell you what range she's in π«Ά
β¨ RETURN VALUE β¨
Returns the SDL_ColorRange of cspace. no drama, no surprises, just the range. periodt π
β¨ THREAD SAFETY β¨
It is safe to call this macro from any thread. like literally any thread, no cap, go wild, she does not care π
β¨ AVAILABILITY β¨
This macro is available since SDL 3.2.0. so if you're on something older than that... bestie. upgrade. π
mwah π that's the whole page. this one came from the Simple Directmedia Layer girlies, it's SDL 3.4.18 era, and it's documented right there in the SDL3 FUNCTIONS chapter β go forth and extract those ranges, you've got this π§π
π¦ 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