S3D_PEP_POLYGON_TEX_(3)

✨ NAME ✨

s3d_pep_polygon_tex_coord β€” bestie, this is the one that adds texture coordinates to a polygon πŸ’…


🌸 SYNOPSIS 🌸

#include <s3d.h>

int s3d_pep_polygon_tex_coord(int object, float x1, float y1, float x2,
                              float y2, float x3, float y3);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: you already pushed a polygon, right? And now you wanna pimp it out with some texture coordinates. That's literally what this does, no cap. 🌈

You hand it x and y values for each vertex point, respectively β€” so x1/y1 for the first vertex, x2/y2 for the second, x3/y3 for the third. Iconic. ✨

Those values may be between 0 and 1, and they're vertex points on the texture that's defined in the material of the polygon. It's giving UV mapping, it's giving main character energy. πŸŽ€

Heads up bestie: this only handles the last polygon pushed. If you've got more polygons that should get a texture, don't do them one by one like a clown β€” use s3d_pep_polygon_tex_coords() instead. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich

Author of s3d πŸ’–


And that's the whole vibe fr fr β€” brought to you by the s3d Manual, S3D_PEP_POLYGON_TEX_(3), page s3d. Slay, go texture something pretty. πŸ’…πŸŒΈβœ¨