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_uvs, font_get_uvs and tileset_get_uvs.
vertex_texcoord(buffer, u, v);
Argument | Type | Description |
---|---|---|
buffer | Vertex Buffer | The vertex buffer to write the information to. |
u | Real | The first texture coordinate on the texture page to use (0 - 1). |
v | Real | The second texture coordinate on the texture page to use (0 - 1). |
N/A
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.