vertex_colour

Set the colour and alpha for the vertex.

语法:

vertex_colour(buffer, colour, alpha);


参数 描述
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).


返回: N/A(无返回值)


描述

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 2 format of BGR, eg: $FF0000 for blue) as well as an alpha value from 0 (transparent) to 1 (fully opaque).


例如:

vertex_colour(b, c_white, 1);

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


上一页: Building Primitives
下一页: vertex_normal
© Copyright YoYo Games Ltd. 2018 All Rights Reserved