vertex_colour

Set the colour and alpha for the vertex.

Syntax:

GML Code Example

vertex_colour(buffer, colour, alpha);


Argument Description
buffer The buffer to write the information to.
colour The colour for this vertex (can be a constant or a hex value).
alpha The alpha value for the vertex (from 0 to 1).


Returns: N/A


Description

If your defined vertex format takes a colour value you can use this function to add that data to the vertex being defined for the current primitive. The function needs a buffer to store the data in and will take either a colour constant, or a hex value (using the standard GameMaker: Studio format of BGR, eg: $FF0000 for blue) as well as an alpha value from 0 (transparent) to 1 (fully opaque).


Example:

GML Code Example

vertex_colour(b, c_white, 1);

The above code will set the vertex being defined to be white with an alpha value of 1.





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