d3d_vertex(x, y, z)
Argument | Description |
---|---|
x | The x coordinate of the vertex. |
y | The y coordinate of the vertex. |
z | The z coordinate of the vertex. |
Returns: N/A
This function defines the position of a vertex for a primitive. The final look of the primitive will depend on the primitive type chosen to draw and the order with which you add the vertexes to it. See
d3d_primitive_begin for more information. to end and draw the primitive you must call d3d_primitive_end.
d3d_primitive_begin(pr_trianglelist);
d3d_vertex(100, 100, 0);
d3d_vertex(100, 200, 0);
d3d_vertex(150, 150, 200);
d3d_vertex(100, 200, 0);
d3d_vertex(200, 200, 0);
d3d_vertex(150, 150, 200);
d3d_vertex(200, 200, 0);
d3d_vertex(100, 100, 0);
d3d_vertex(150, 150, 200);
d3d_vertex(100, 100, 0);
d3d_vertex(100, 200, 0);
d3d_vertex(200, 200, 0);
d3d_primitive_end();
The above code will draw a tetrahedron standing on the z=0 plane with its top at z = 200.