s3d_push_polygons(3)

s3d_push_polygons3

Push many polygons

Usage

#include <s3d.h>

int s3d_push_polygons(int object, const uint32_t *pbuf, uint16_t n);

Overview

As for vertices, you can push arrays of polygons to have greater performance. The pbuf should contain n polygons which consist of 4 uint32_t values of 3 vertices indices and 1 material index.

 uint32_t pbuf[] = { 0, 1, 2, 0};
 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_polygons(oid, pbuf, 1);
 // push one polygon with the pbuf data

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7–13

Author

Simon Wunderlich

Author of s3d

From s3d-doc 0.2.2.1-7 in Debian 13 (Trixie). Parsed by carta from the page's man source.