d3d_model_primitive_end

Ends the process of adding primitives to a model in 3D.

Syntax:

d3d_model_primitive_end(ind)


Argument Description
ind The index of the model to end the addition of primitives to.


Returns: N/A


Description

This function must be called when you have finished adding primitives to a previously defined 3D model.


Example:

model[2] = d3d_model_create();
d3d_model_primitive_begin(model[2], pr_trianglestrip);
d3d_model_vertex(model[2], 100, 100, 0);
d3d_model_vertex(model[2], 100, 200, 0);
d3d_model_vertex(model[2], 150, 150, 200);
d3d_model_vertex(model[2], 100, 200, 0);
d3d_model_vertex(model[2], 200, 200, 0);
d3d_model_vertex(model[2], 150, 150, 200);
d3d_model_vertex(model[2], 200, 200, 0);
d3d_model_vertex(model[2], 100, 100, 0);
d3d_model_vertex(model[2], 150, 150, 200);
d3d_model_vertex(model[2], 100, 100, 0);
d3d_model_vertex(model[2], 100, 200, 0);
d3d_model_vertex(model[2], 200, 200, 0);
d3d_model_primitive_end(model[2]);

The above code will define a tetrahedron and add it to the model.


Back: 3D Drawing
Next: d3d_model_block
© Copyright YoYo Games Ltd. 2018 All Rights Reserved