D3d_model_index - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Description

Appends a new vertex index to the given model.

Parameters

Parameter Data Type Description
id integer index of the model to add the index to
ind unsigned index of the vertex to add

Return Values

void: This function has no return values.

Example Call

// demonstrates indexing a triangle list
d3d_model_primitive_begin(mymod, pr_trianglelist);
d3d_model_vertex(mymod, x0, y0, z0);
d3d_model_vertex(mymod, x1, y1, z1);
d3d_model_vertex(mymod, x2, y2, z2);
d3d_model_vertex(mymod, x3, y3, z3);

d3d_model_index(mymod, 0);
d3d_model_index(mymod, 1);
d3d_model_index(mymod, 2);

d3d_model_index(mymod, 3);
d3d_model_index(mymod, 2);
d3d_model_index(mymod, 1);
d3d_model_primitive_end(mymod);

NOTOC