SDL_SetTextureBlendMode(3)
π SDL_SetTextureBlendMode(3) π
okay so bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today we're talking about SDL_SetTextureBlendMode β the glow-up button for your textures β¨
πΈ NAME πΈ
SDL_SetTextureBlendMode β set the blend mode for a texture, used by SDL_RenderTexture(). yes queen, this is the one that decides how your texture mixes with whatever's underneath it π
π SYNOPSIS π
#include <SDL3/SDL_render.h>
bool SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode);
π¦ DESCRIPTION π¦
So like, this blend mode is what gets used for any drawing that involves this texture. every single time you draw with it, this is the vibe it's giving. π
And here's the tea, no cap: if the blend mode you asked for isn't supported, SDL doesn't just crash out β it picks the closest supported mode instead and this function returns false. so you lowkey got what you wanted, but not exactly what you wanted. π
π«Ά FUNCTION PARAMETERS π«Ά
textureβ the texture to update. the one getting the makeover πblendModeβ theSDL_BlendModeto use for texture blending. pick your fighter β¨
β RETURN VALUE β
Returns true on success or false on failure β and when it's a flop, call SDL_GetError() for more information, because she will tell you what went wrong π’
π₯ THREAD SAFETY π₯
This function should only be called on the main thread. main character energy only, bestie β no side quests, no other threads, periodt. π
π AVAILABILITY π
This function is available since SDL 3.2.0. iconic behavior honestly π
π SEE ALSO π
go read those too, iykyk π¦
mwah π this little love letter to the docs came to you from Simple Directmedia Layer, rockin' version SDL 3.4.18, and it's filed under SDL_SetTextureBlendMode(3) β stay blended, stay slay πβ¨
π¦ 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