SDL_GetSurfaceColorMod(3)
π SDL_GetSurfaceColorMod π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, where we're talking about SDL_GetSurfaceColorMod β the little cutie that tells you what extra color value is getting multiplied into your blit operations. β¨
πΈ NAME πΈ
SDL_GetSurfaceColorMod β get the additional color value multiplied into blit operations. that's it, that's the whole vibe check. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_surface.h>
bool SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b);
β¨ FUNCTION PARAMETERS β¨
so you're passing in four things, and like, each one matters, no cap:
surfaceβ theSDL_Surfacestructure you wanna query. it's the main character here, she's the one getting interrogated. πrβ a pointer that gets filled in with the current red color value. yes it's a pointer, yes you have to give her somewhere to live.gβ a pointer that gets filled in with the current green color value. same deal, she needs a home too. πΏbβ a pointer that gets filled in with the current blue color value. trio complete, slay. π
π«Ά RETURN VALUE π«Ά
returns true on success or false on failure β and if it's giving failure, call SDL_GetError() for more information, because she will tell you what went wrong, bestie. π
π§ THREAD SAFETY π§
this function can be called on different threads with different surfaces. so like, parallel besties, different surfaces, everyone minding their own business. periodt. π
π AVAILABILITY π
this function is available since SDL 3.2.0. iconic behavior from day one, honestly. β
π SEE ALSO π
ngl if you're reading the whole set of these you're lowkey becoming a surface mod connoisseur and i'm obsessed with that for you. π₯
and that's the tea, bestie β this page came straight out of the Simple Directmedia Layer era, version SDL 3.4.18, with SDL_GetSurfaceColorMod(3) holding it down. go forth and multiply those color values, you 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