draw_vertex

Defines a vertex for a primitive.

Syntax:

draw_vertex(x, y)


Argument Description
x The x coordinate of the vertex.
y The y coordinate of the vertex.


Returns: N/A


Description

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 draw_primitive_begin for more information. To end and draw the primitive you must call draw_primitive_end.


Example:

draw_primitive_begin(pr_trianglelist);
draw_vertex(100, 100);
draw_vertex(100, 200);
draw_vertex(150, 150);
draw_primitive_end();

The above code will draw a simple triangle primitive.


Back: 2D Primitives
Next: draw_vertex_colour
© Copyright YoYo Games Ltd. 2018 All Rights Reserved