SDL_GetRenderDrawColorFloat(3)
π SDL_GetRenderDrawColorFloat(3) π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_GetRenderDrawColorFloat β she's the one who tells you what color you've been drawing with. π¨β¨
πΈ NAME πΈ
SDL_GetRenderDrawColorFloat β get the color used for drawing operations (Rect, Line and Clear). yes gurl, all three of them π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_render.h>
bool SDL_GetRenderDrawColorFloat(SDL_Renderer *renderer, float *r, float *g, float *b, float *a);
like, you hand her a renderer and four little float pointers and she fills them in. float energy only, no cap π«Ά
π FUNCTION PARAMETERS π
rendererβ the rendering context. the whole vibe, the canvas, the moment. πΌοΈrβ a pointer filled in with the red value used to draw on the rendering target. red alert but make it cute πgβ a pointer filled in with the green value used to draw on the rendering target. green flag behavior fr πΏbβ a pointer filled in with the blue value used to draw on the rendering target. blue era π¦aβ a pointer filled in with the alpha value used to draw on the rendering target. the transparency queen, she's giving invisibility realness π
not me pointing out that all four of these are pointers that get filled in by the function β so yes, you gotta pass real memory, not vibes. π«
π RETURN VALUE π
Returns true on success or false on failure; call SDL_GetError() for more information. if she says false, go ask SDL_GetError() what went wrong, she always spills the tea βπ
π§ THREAD SAFETY π§
This function should only be called on the main thread. periodt. no side-quest threads, no sneaky background gossip, main thread only bestie π
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on something olderβ¦ girl, update. π
π SEE ALSO π
SDL_SetRenderDrawColorFloat(3)β the setter, her other half π«ΆSDL_GetRenderDrawColor(3)β the non-float sibling, still iconic π
and that's the whole page!! Simple Directmedia Layer, SDL 3.4.18 β mwah, tysm for reading, go draw something gorgeous with your floats πΈπ β¨
π¦ 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