SDL_GetRenderDrawBlendMode(3)

πŸ’– SDL_GetRenderDrawBlendMode πŸ’–

okay so bestie, welcome to the SDL3 functions corner of the man pages, and today's main character is SDL_GetRenderDrawBlendMode β€” literally the function that tells you how your renderer is blending stuff when it draws. no cap.


✨ NAME ✨

SDL_GetRenderDrawBlendMode β€” Get the blend mode used for drawing operations.

like, it's a getter. it gets. it's giving "just tell me the vibe" energy and honestly? we love that for it. 🫢


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_render.h>

bool SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • renderer β€” the rendering context. yes queen, your SDL_Renderer, the one doing all the actual drawing. hand it over. πŸ’…
  • blendMode β€” a pointer that gets filled in with the current SDL_BlendMode. so you pass in the address of your variable and it writes the answer in there for you. it's giving "out-param" excellence, iykyk. ✨

πŸ’œ RETURN VALUE πŸ’œ

Returns true on success or false on failure. and if it fails? call SDL_GetError() for more information, bestie. that's where the tea is. 😭


πŸ¦‹ THREAD SAFETY πŸ¦‹

This function should only be called on the main thread. fr fr. do not be out here calling it from your worker threads, that is not the move. 🚫


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on something older... yeah no, it's not there yet, sorry babe. πŸ™ˆ


🌈 SEE ALSO 🌈

  • SDL_SetRenderDrawBlendMode(3) β€” the setter! the other half of the duo! the iconic pair! go set it, then come back and get it. it's a whole relationship. πŸ‘‘

ngl, this is the chillest function ever: you give it a renderer, it gives you the blend mode. no drama, no surprises. periodt. πŸ’€

mwah πŸ’‹ that's the whole page! this lil slice of the Simple Directmedia Layer docs comes from SDL 3.4.18, and the page itself is SDL_GetRenderDrawBlendMode(3). go forth and query your blend modes, bestie β€” you're gonna slay. πŸŒΈπŸ’–βœ¨

πŸ“¦ where this page comes from