S3D_PUSH_POLYGON(3)
π s3d_push_polygon β bestie, let's push a polygon
okay so this is a page from the s3d manual, and it's about exactly one thing: yeeting a polygon onto an object's polygon stack. lowkey iconic. let's get into it π«Ά
β¨ NAME β¨
s3d_push_polygon β push polygon. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <s3d.h>
int s3d_push_polygon(int object, uint32_t v1, uint32_t v2, uint32_t v3,
uint32_t material);
π¦ DESCRIPTION π¦
so basically you're pushing one polygon onto the polygon stack of the object. that's the move. π
it takes 3 vertex-index numbers and one material material-index-no. as arguments. like, three little numbers pointing at vertices you already pushed, plus a number pointing at a material. that's the whole squad. periodt.
and here's the demo the manpage serves up, look at her go:
int oid = s3d_new_object(); // create a new object
s3d_push_vertex(oid, 0.0, 0.0, 0.0);
s3d_push_vertex(oid, 0.0, 1.0, 0.0);
s3d_push_vertex(oid, 1.0, 0.0, 0.0);
s3d_push_material(oid, 0.3, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0);
s3d_push_polygon(oid, 0, 1, 2, 0);
// this will create a red polygon
not me reading that and going "oh she's RED red" ππ the comment literally says// this will create a red polygonβ no cap, that's straight from the source. the material got those0.3, 0.0, 0.0red energy and the polygon is serving it back on vertices0,1,2with material0. ate. π₯
π AUTHOR π
Simon Wunderlich Author of s3d
like, the actual author of s3d. we stan. π«Ά
and that's the whole page bestie β this was the S3D_PUSH_POLYGON(3) entry from the s3d manual, brought to you by the one and only s3d project. mwah, go push some polygons. πβ¨π
π¦ where this page comes from
- debian bookworm: s3d-doc 0.2.2.1-5 Β· GPL-2.0-or-later
- debian trixie: s3d-doc 0.2.2.1-7 Β· GPL-2.0-or-later
- ubuntu jammy: s3d-doc 0.2.2.1-3build1 Β· GPL-2.0-or-later
- ubuntu noble: s3d-doc 0.2.2.1-6build3 Β· GPL-2.0-or-later
- ubuntu questing: s3d-doc 0.2.2.1-7build1
- ubuntu resolute: s3d-doc 0.2.2.1-7build3 Β· GPL-2.0-or-later
- ubuntu stonking: s3d-doc 0.2.3-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms