vertex_texcoord

This function sets the texture coordinates to use for the vertex currently being defined for the custom primitive.

You supply the vertex buffer to write the data into as well as the UV position on the texture page to use.

NOTE To get the UV range of a specific asset on the texture page you can use sprite_get_uvsfont_get_uvs and tileset_get_uvs.

 

Syntax:

vertex_texcoord(buffer, u, v);

ArgumentTypeDescription
bufferVertex BufferThe vertex buffer to write the information to.
uRealThe first texture coordinate on the texture page to use (0 - 1).
vRealThe second texture coordinate on the texture page to use (0 - 1).

 

Returns:

N/A

 

Example:

vertex_texcoord(buff, 0, 0);

The above code sets the UV coordinates of the vertex being defined to the top-left corner of the texture page that will be used to draw it.