al_set_bitmap_blender(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_set_bitmap_blender β€” Allegro 5 API πŸ’–

okay so bestie, welcome to the <allegro5/allegro.h> cinematic universe, this is the al_set_bitmap_blender page from the Allegro reference manual and we're gonna get you fluent in it, no cap ✨


πŸŽ€ SYNOPSIS πŸŽ€

like, the whole vibe in two lines:

#include <allegro5/allegro.h>

void al_set_bitmap_blender(int op, int src, int dest)

that's it. that's the function. she's small but she's mighty πŸ’…


🌸 DESCRIPTION 🌸

so, al_set_bitmap_blender sets the function to use for blending when you're rendering to the target bitmap. that's her whole job. main character energy, honestly.

and here's the little plot twist: if no blender is set for a given bitmap at draw time, the values you set with al_set_blender(3alleg5) / al_set_separate_blender(3alleg5) get used instead. so like, she's the bitmap-specific override, and the global one is the fallback. the way that works?? iconic πŸ¦‹

now, if you want separate functions for the chroma (RGB) channels and the alpha channel, that's a whole different girl β€” go use al_set_separate_bitmap_blender(3alleg5) 🫢

and if you want to actually understand how blending works under the hood (the math, the drama, the lore), al_set_blender(3alleg5) is where the tea is at. she explains everything πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

go read those too, bestie, they're literally right there and they're obsessed with her πŸ’–


⭐ SINCE ⭐

this one's been around since 5.2.5 ✨

⚠️ [Unstable API]: New API. β€” yeah she said it herself. it's new, it's unstable, treat her gently, ok?? 😭

and that's the page, no notes, you ate it πŸ’…πŸ’– thanks for reading, this was the Allegro reference manual, al_set_bitmap_blender(3alleg5), screaming crying throwing confetti from the allegro5 era πŸŽ€βœ¨ mwah, bye bestie! πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from