POLYTYPE_GRGB(3)
π POLYTYPE_GRGB π
okay bestie, so this is one of the polygon rendering modes from the Allegro game programming library β like, the whole POLYTYPE_* fam, and this one is that girl. it's a manual page, but make it make sense, so here we go π«Ά
β¨ SYNOPSIS β¨
#include <allegro.h>
#define POLYTYPE_GRGB
like yes that's the whole thing, she's lowkey minimal π
πΈ DESCRIPTION πΈ
so POLYTYPE_GRGB is a gouraud shaded polygon β iconic, we love her β but the twist is she interpolates RGB triplets instead of just one single color. rainbow gradient realness πβ¨
β οΈ okay so in 256-color modes, this uses the global rgb_map table to convert the result into an 8-bit paletted color. which means it must ONLY be used after you've set up the RGB mapping table!! not before!! do not play with her like that π
the colors for each vertex come from the c value, and that gets interpreted as a 24-bit RGB triplet. so for the record, bestie:
0xFF0000is red π₯0x00FF00is green π0x0000FFis blue π¦
no cap, that's literally the whole vibe. three bytes, one vertex, endless slay.
π SEE ALSO π
go read those too, iykyk π
and that's the tea, bestie π this was brought to you by the Allegro manual, version 4.4.3 β she's giving vintage, she's giving iconic, periodt π β¨
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms