glTexCoord

Definition: include pGUI.e
include opengl.e

glTexCoord(atom s, t=0, r=0, q=1)
Description: Sets the current texture coordinates.

s: The s texture coordinate.
t: The t texture coordinate.
r: The r texture coordinate.
q: The q texture coordinate.
Remarks The glTexCoord function sets the current texture coordinates that are part of the data associated with polygon vertices.
The glTexCoord function specifies texture coordinates in one, two, three, or four dimensions.
If only one parameter is passed the glTexCoord function sets the current texture coordinates to (s, 0, 0, 1); a call with two parameters sets them to (s, t, 0, 1). Similarly, when three parameters are provided glTexCoord specifies the texture coordinates as (s, t, r, 1), and finally with all four components explicitly as (s, t, r, q).
You can update the current texture coordinates at any time.
In particular, you can call glTexCoord between a call to glBegin and the corresponding call to glEnd.
The following function retrieves information related to glTexCoord:
glGet with argument GL_CURRENT_TEXTURE_COORDS

There are 32 C functions (see index, coloured illegal and linked here) named glTexCoordNx[v], where N is 1..4, x is d/f/i/s for double/float/integer/short, and the v if present indicates the parameter is a pointer to the first of such (only useful if there was some good reason why you already had your double/float/integer/short values poked into some allocated memory, let me know if you find such a need).
The optional parameters and generic atom types of phix mean these can and should all be wrapped into a single pGUI function.
See Also: glVertex