V3D_f(3alleg4)

πŸ’– V3D_f β€” bestie's guide to the floaty lil' vertex πŸ’–

okay so you found yourself a page from the Allegro manual (that's section 3alleg4, iykyk) and it's all about V3D_f β€” the floating point vertex structure that all the 3d functions in the Allegro game programming library are absolutely obsessed with. it's giving "tiny struct, huge main character energy". ✨


✨ SYNOPSIS ✨

#include <allegro.h>

typedef struct V3D_f

like yes bestie that's the whole synopsis, it's a struct, we move. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's what's inside this little guy:

   float x, y, z;       - position
   float u, v;          - texture map coordinates
   int c;               - color

let me translate, because the way that x, y and z are just the position β€” like where in space this vertex is vibing β€” is so real. then u and v are your texture map coordinates (the "which pixel of the texture am I" situation), and c is the color. periodt. πŸ’…

so basically it's exactly like V3D, except β€” and this is the whole plot twist β€” it uses float values instead of fixed ones. floats. fancy. πŸ’–

and if you wanna know how to actually obtain and use this structure, the manual is like "go read the description of polygon3d_f()" β€” so go do that, bestie, it's all in there. 🫢


🌸 SEE ALSO 🌸

the group chat, the whole squad, no one left out:


ngl V3D_f is the float twin of V3D, so if you're mixing them up, vibe check your types before you ship it. 😭

that's the whole page, you ate it, go be iconic with your vertices. πŸ’œ this was Allegro version 4.4.3, dropping the V3D_f(3alleg4) energy, and yeah β€” that's the sign-off, mwah. πŸŽ€βœ¨πŸ¦‹