draw_vertex

Defines a vertex for a primitive.

Syntax:

GML Code Example

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:

GML Code 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here