SDL_GetRenderColorScale(3)

πŸ’– SDL_GetRenderColorScale(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, we're doing renderer lore today ✨


🌸 NAME 🌸

SDL_GetRenderColorScale β€” grab the color scale that your render operations are currently using 🎨


✨ SYNOPSIS ✨

#include <SDL3/SDL_render.h>

bool SDL_GetRenderColorScale(SDL_Renderer *renderer, float *scale);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • renderer β€” the rendering context, aka your whole renderer situation, the main character of this function 🫢
  • scale β€” a pointer that gets filled in with the current color scale value. she's an output param, she doesn't come with info, she receives info πŸ’…

⭐ RETURN VALUE ⭐

Returns true on success or false on failure. and if it fails?? call SDL_GetError() for more information, because the universe will not tell you why for free 😭


🧚 THREAD SAFETY 🧚

This function should only be called on the main thread. no sneaky background threads, no chaos gremlin energy, just main thread. periodt. πŸ‘‘


🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. so if you're on something older... bestie. upgrade. πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ


and that's the whole vibe check, you're officially fluent in color scale retrieval ✨

Simple Directmedia Layer πŸŽ€ SDL 3.4.18 β€” mwah, love u, go read the source, iykyk πŸ’–πŸ’…

πŸ“¦ where this page comes from