set_blender_mode_ex(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– set_blender_mode_ex(3) πŸ’–

okay bestie, so this one lives in the Allegro manual and it's literally the extra-extra version of set_blender_mode() β€” the one that lets you hand-pick your whole blender lineup instead of settling for the basic pack. Allegro game programming library, if you didn't already clock that. πŸ‘‘


✨ SYNOPSIS ✨

#include <allegro.h>

void set_blender_mode_ex(BLENDER_FUNC b15, b16, b24, b32, b15x, b16x,
b24x, int r, g, b, a);

like... look at all those parameters. she's high maintenance and we respect it. πŸ’…


🌸 DESCRIPTION 🌸

So it's giving set_blender_mode(), but with a fuller, more complete set of blender routines that you get to specify. no cap.

Here's the vibe breakdown, bestie:

  • b15, b16, b24, and b32 β€” these are the routines used when drawing pixels onto destinations of the same format. so 15-bit blender goes with a 15-bit destination, 32 with 32, you get it. πŸŽ€
  • b15x, b16x, and b24x β€” these cuties get used by draw_trans_sprite() and draw_trans_rle_sprite() when drawing RGBA images onto destination bitmaps of another format. the x is for "cross-format", which honestly? iconic naming. ✨

and the important bit, no skipping: these blenders will be passed a 32-bit x parameter, along with a y value of a different color depth, and they must try to do something sensible in response. 😭 like there's no magic fix in here, the routine has to cope with the mismatch itself. fr fr.

heads up bestie: this isn't a "just trust me" function β€” you're the one supplying the blenders, so whatever they do is on you. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, they're the whole friend group. 🫢


and that's the tea, bestie πŸ’œ this page came straight out of the Allegro manual, version 4.4.3, and the header up top still says set_blender_mode_ex(3) because that's just who she is. go blend something gorgeous. πŸŽ€βœ¨

πŸ“¦ where this page comes from