d3d_primitive_end()
Returns: N/A
This function must be called when you have finished defining the
points of your primitive. If you do not call this function,
nothing will be drawn as this effectively tells
GameMaker: Studio that you have finished and that it can now
draw the defined primitive.
d3d_primitive_begin(pr_trianglelist);
d3d_vertex_colour(100, 100, 0, c_blue, 0.1);
d3d_vertex_colour(100, 200, 0, c_blue, 0.1);
d3d_vertex_colour(150, 150, 200, c_red, 1);
d3d_vertex_colour(100, 200, 0, c_blue, 0.1);
d3d_vertex_colour(200, 200, 0, c_blue, 0.1);
d3d_vertex_colour(150, 150, 200, c_red, 1);
d3d_vertex_colour(200, 200, 0, c_blue, 0.1);
d3d_vertex_colour(100, 100, 0, c_blue, 0.1);
d3d_vertex_colour(150, 150, 200, c_red, 1);
d3d_vertex_colour(100, 100, 0, c_blue, 0.1);
d3d_vertex_colour(100, 200, 0, c_blue, 0.1);
d3d_vertex_colour(200, 200, 0, c_blue, 0.1);
d3d_primitive_end();
The above code will draw a tetrahedron standing on the z=0 plane with its top coloured red and fully opaque at z = 200, while its base will be blue and transparent.