3.6. s3d_push_polygon

#include <s3d.h>

int s3d_push_polygon(int object, int v1, int v2, int v3, int material, );

push one polygon on the polygonstack of the object. it takes 3 vertex-index- numbers and one material material-index-nr. as argument.


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 */