SDL_SetRenderDrawBlendMode(3)
π SDL_SetRenderDrawBlendMode(3) π
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_SetRenderDrawBlendMode β the girl who decides how your shapes and lines get blended together. she's giving render pipeline royalty, no cap. π
β¨ NAME β¨
SDL_SetRenderDrawBlendMode β set the blend mode used for drawing operations. that's it, that's the whole job, and she does it flawlessly. π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_render.h>
bool SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode);
look at her. two params, one bool. clean, minimal, iconic. π
π¦ DESCRIPTION π¦
so here's the tea, bestie: this blend mode is the one that gets used for any drawing that doesn't involve textures. like, if you're out here drawing plain rectangles and lines and stuff β no texture in sight β this is the blend mode in charge. she's the queen of the textureless era. π
and here's the part you gotta know: if the blend mode you ask for is not supported, SDL doesn't just crash out or ignore you β it picks the closest supported mode instead. so you might not get exactly what you asked for, and that's just how it is. close enough is close enough. π
π FUNCTION PARAMETERS π
rendererβ the rendering context. your whole render situation. hand her over. π«ΆblendModeβ theSDL_BlendModeyou want to use for blending. this is your vibe request. β¨
β RETURN VALUE β
returns true on success or false on failure. and if it's a false? do not panic, just call SDL_GetError() for more information β she will tell you exactly what went wrong. π
π THREAD SAFETY π
this function should only be called on the main thread. periodt. don't try to be sneaky from some background thread, she will not tolerate it. main character energy only, and the main thread is the main character. π
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on something older, bestie... no she is not there. upgrade. π
π₯ SEE ALSO π₯
SDL_GetRenderDrawBlendMode(3)β the lil mirror that tells you what blend mode you're currently on. πͺSDL_SetTextureBlendMode(3)β same energy but for textures, iykyk. π§
and that's the whole page, bestie, you ate it. this came to you straight from Simple Directmedia Layer, version SDL 3.4.18, and it's the SDL_SetRenderDrawBlendMode(3) page β go forth and blend responsibly. 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