vertex_position

This function adds 2D position data to the vertex currently being defined for the custom primitive.

You supply the vertex buffer to write the data into as well as the x and y components of the vertex position.

 

Syntax:

vertex_position(buffer, x, y);

ArgumentTypeDescription
bufferVertex BufferThe vertex buffer to write the information to.
xRealThe x position.
yRealThe y position.

 

Returns:

N/A

 

Example:

vertex_position(buff, x - 100, y - 125);

The above code sets the 2D position of the vertex being defined.