set_alpha_blender(3alleg4)
β¨ set_alpha_blender β¨
okay bestie, so this is a page from the Allegro manual (that's the 3alleg4 girlies, version 4.4.3 if you were wondering), and today's main character is set_alpha_blender β she turns on a special alpha-channel blending mode. π
Allegro game programming library, no cap.
π¦ NAME π¦
set_alpha_blender β Enables a special alpha-channel blending mode. Allegro game programming library.
π SYNOPSIS π
#include <allegro.h>
void set_alpha_blender();
π DESCRIPTION π
okay so listen. This function enables the special alpha-channel blending mode, and that mode is literally the one you use for drawing 32-bit RGBA sprites. β¨
After you call this function, you can use draw_trans_sprite() or draw_trans_rle_sprite() to draw a 32-bit source image onto any hicolor or truecolor destination. The alpha values get taken directly from the source graphic, so you can vary the solidity of each part of the image. Like, per-pixel vibes. Obsessed. π«Ά
β οΈ but bestie, here's the catch β while this mode is active you can't use any of the normal translucency functions. So reset to one of the normal blender modes (eg. set_trans_blender()) before drawing anything that isn't a 32-bit RGBA sprite. Don't skip this step, it's giving consequences. π
πΈ SEE ALSO πΈ
set_trans_blender(3alleg4)draw_trans_sprite(3alleg4)draw_trans_rle_sprite(3alleg4)set_write_alpha_blender(3alleg4)exalpha(3alleg4)exrotscl(3alleg4)extrans(3alleg4)
and that's the whole page, bestie π this was Allegro, version 4.4.3 β slay, go blend some sprites, ily ππ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms