SDL_GetTextureColorMod(3)
π SDL_GetTextureColorMod(3) π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_GetTextureColorMod β yes that's the whole name, we're not abbreviating, she earned it π
β¨ NAME β¨
SDL_GetTextureColorMod β get the additional color value multiplied into render copy operations.
like, the little color tint that gets multiplied into every render copy. that's the one. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_render.h>
bool SDL_GetTextureColorMod(SDL_Texture *texture, Uint8 *r, Uint8 *g, Uint8 *b);
copy that include exactly, no cap. π
π¦ FUNCTION PARAMETERS π¦
textureβ the texture we're querying. the one we're interrogating. the subject of the vibe check πrβ a pointer that gets filled in with the current red color value.gβ a pointer that gets filled in with the current green color value.bβ a pointer that gets filled in with the current blue color value.
three pointers, three colors, three little values handed back to you. it's giving RGB bestie era π
β RETURN VALUE β
Returns true on success or false on failure. and if it fails? call SDL_GetError() for more information, she will tell you everything π£οΈ
fr fr, always check the return value. false is not a vibe, it's a warning.
π THREAD SAFETY π
This function should only be called on the main thread.
main thread only!! do NOT go spawning threads and calling this from them, that's not the moment, that's not the energy π
π AVAILABILITY π
This function is available since SDL 3.2.0. so if you're on something older, no she's not there yet, sorry bestie π
π SEE ALSO π
go read those too, they're all part of the same friend group π«Ά
and that's the whole page!! tysm for reading, ily, go tint something pretty β¨π
Simple Directmedia Layer β SDL 3.4.18 β SDL_GetTextureColorMod(3) π¦ that's the source, the version and the date all wrapped up in a little bow, mwah π
π¦ 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