POLYTYPE_GRGB(3alleg4)

πŸ’– NAME πŸ’–

POLYTYPE_GRGB β€” bestie, it's a polygon rendering mode type from the Allegro game programming library πŸŽ€


✨ SYNOPSIS ✨

#include <allegro.h>

#define POLYTYPE_GRGB

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen. POLYTYPE_GRGB is a gouraud shaded polygon, but not like the regular kind β€” instead of interpolating one single color across the whole thing, it interpolates RGB triplets. Full color gradient vibes, it's giving sunset energy fr fr πŸŒ…

⚠️ 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 have set up the RGB mapping table! No cap, if you skip that step you're gonna have a bad time 😭

The colors for each vertex come from the c value, and that value gets interpreted as a 24-bit RGB triplet. So like:

  • 0xFF0000 is red πŸ”΄
  • 0x00FF00 is green 🟒
  • 0x0000FF is blue πŸ”΅

That's it, that's the whole color language. Slay πŸ’…


🌸 SEE ALSO 🌸


k bye bestie, go make something pretty πŸ’œ this was Allegro, version 4.4.3, and yes this page is literally called POLYTYPE_GRGB(3alleg4) β€” write it down, it's iconic πŸ‘‘βœ¨