vertex_texcoord(buffer,u,v)

From ENIGMA
Revision as of 19:21, 17 June 2018 by RobertBColton (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

Adds the given UV coordinate to the current vertex in the given vertex buffer.
Note: Texture repetition can be toggled with texture_set_repeat

Parameters

Parameter Data Type Description
buffer integer Index of the vertex buffer.
u gs_scalar X coordinate of the UV texture position, value lies between 0 and 1.
v gs_scalar Y coordinate of the UV texture position, value lies between 0 and 1.

Return Values

void: This function does not return anything.

Example Call

// demonstrates adding a vertex with texture coordinates to a vertex buffer
vertex_begin(static_buffer, vf_position_texcoord);
vertex_position(static_buffer, x, y);
vertex_texcoord(static_buffer, tx, ty);
vertex_end(static_buffer);