SDL_GetTextureAlphaMod(3)

SDL_GetTextureAlphaMod πŸ’…βœ¨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual πŸŽ€ this one lives in SDL3 and it's lowkey a tiny little baddie β€” it's the getter that tells you what extra alpha is being multiplied into your render copy operations. yes. the additional alpha. the sneaky extra one. πŸ¦‹


✨ NAME ✨

SDL_GetTextureAlphaMod β€” get the additional alpha value multiplied into render copy operations 🫢


✨ SYNOPSIS ✨

#include <SDL3/SDL_render.h>

bool SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha);

look at her. two args. so clean. so demure. πŸ’œ


✨ FUNCTION PARAMETERS ✨

  • texture β€” the texture you're querying, bestie. the one you wanna know about. πŸ‘‘
  • alpha β€” a pointer that gets filled in with the current alpha value ✨. not the alpha you want, the alpha you have. she writes into it, so hand her somewhere to write. πŸ“

✨ RETURN VALUE ✨

Returns true on success or false on failure πŸ’– β€” and if it's a false situation, call SDL_GetError() for more information, because she will NOT elaborate on her own. 😭

no cap, if you get false and just move on without checking SDL_GetError(), that's on you fr fr πŸ’€

✨ THREAD SAFETY ✨

This function should only be called on the main thread. 🚨

main thread only. main character energy only. do not be passing this off to your little worker threads, she will not answer. πŸ™ˆ


✨ AVAILABILITY ✨

This function is available since SDL 3.2.0. 🌱

so if you're on something older than that, she simply does not exist yet. rip. ⭐


✨ SEE ALSO ✨

the whole alpha mod friend group. go say hi. iykyk πŸ’…


and that's the whole page, bestie!! you ate that πŸ’–βœ¨

this has been a page from the Simple Directmedia Layer manual, SDL 3.4.18 β€” mwah, go forth and modulate your alphas responsibly πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from