SDL_GetTextureColorModFloat(3)

πŸ’– SDL_GetTextureColorModFloat πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, this one's called SDL_GetTextureColorModFloat(3) and it's genuinely so useful. it's giving "peek at the color vibes without touching anything" ✨


✨ NAME ✨

SDL_GetTextureColorModFloat β€” get that extra color value that's being multiplied into render copy operations. 🎨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_render.h>

bool SDL_GetTextureColorModFloat(SDL_Texture *texture, float *r, float *g, float *b);

🌸 FUNCTION PARAMETERS 🌸

  • texture β€” the texture you're querying, aka the main character you're asking about πŸ‘‘
  • 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 πŸ’™

πŸŽ€ RETURN VALUE πŸŽ€

returns true when it slays (success) or false when it flops (failure). if it flops, hit up SDL_GetError() for the deets, fr fr 😭


πŸ’… THREAD SAFETY πŸ’…

bestie. this function should only be called on the main thread. no side quests, no other threads, main thread only. periodt. 🚫🧡

⭐ AVAILABILITY ⭐

this icon has been available since SDL 3.2.0. if you're on anything older, she's not there yet, sorry babe πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

go read those next, iykyk 🫢


and that's the whole vibe check πŸ’– brought to you by Simple Directmedia Layer, version SDL 3.4.18 β€” mwah, love u, go mod some colors πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from