Defines a primitive vertex with colour and alpha blending.


GML Code Example

draw_vertex_colour(x, y, col, alpha)

Argument Description
x The x coordinate of the vertex.
y The y coordinate of the vertex.
col The colour to draw this vertex with.
alpha The alpha to draw this vertex with (0-1).

Returns: N/A


This function defines the position of a vertex for a primitive, with its own colour and alpha setting. 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) and the vertexes with different colours and alphas will blend smoothly from one to the other. To end and draw the primitive you must call draw_primitive_end.


GML Code Example

 draw_vertex_colour(100, 100, c_blue, 0.1);
 draw_vertex_colour(100, 200, c_red, 0.1);
 draw_vertex_colour(150, 150, c_green, 1);

The above code will draw a semi-transparent triangle with each vertex coloured a different colour.

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