POLYTYPE_GRGB(3)

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

πŸ’– 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:

  • 0xFF0000 is red πŸ”₯
  • 0x00FF00 is green πŸ“
  • 0x0000FF is 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