quad3d(3)

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

πŸ’… quad3d β€” Allegro manual, bestie edition πŸŽ€

ok so you want to know about quad3d and quad3d_f? slay, because these two are literally your new faves. this is all from the Allegro game programming library, and the whole vibe is: you're drawing a 3d quad onto a bitmap. that's it. that's the moment. ✨


🌈 NAME 🌈

quad3d, quad3d_f β€” draws a 3d quad onto the specified bitmap. part of the Allegro game programming library. yes bestie, a quad. four corners. main character energy fr fr. πŸ‘‘


✨ SYNOPSIS ✨

#include <allegro.h>

void quad3d(BITMAP *bmp, int type, BITMAP *tex, V3D *v1, *v2, *v3, *v4);

void quad3d_f(BITMAP *bmp, int type, BITMAP *tex, V3D_f *v1, *v2, *v3,
*v4);

not me copy-pasting the include like a good student 🫢 it's giving #include <allegro.h> and nothing else. periodt.


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: these functions draw 3d quads, and you get to pick whether you're working with fixed or floating point vertex structures. pick your fighter. πŸ’…

  • quad3d β€” the one that takes V3D vertices (fixed point, iykyk).
  • quad3d_f β€” the one that takes V3D_f vertices (floating point, fancy).

and honestly? these two are equivalent to just calling:

polygon3d(bmp, type, tex, 4, v[])

for quad3d, or:

polygon3d_f(bmp, type, tex, 4, v[])

for quad3d_f. literally the same thing, just a lil convenience wrapper so you don't have to type the 4 yourself. we love a shortcut. πŸŽ€

πŸ’‘ bestie, before you go wild with the type parameter β€” go read the beginning of the chapter "Polygon rendering". that's where the list of rendering types you can use with this function lives. no cap, it's all there. don't skip it, the type arg is not a vibe-check-it-later situation. 😭

🌸 SEE ALSO 🌸

  • polygon3d(3) β€” the big sibling this one leans on.
  • triangle3d(3) β€” one less corner, same energy.
  • ex3d(3) β€” the example, go look at it, it ate. πŸ”₯

Allegro, version 4.4.3 β€” that's the source and the version, bestie, and that's the whole page. go draw some quads, you're gonna be so good at this. mwah. πŸ’–πŸ§šβœ¨

πŸ“¦ where this page comes from