Method GL.glTexCoord()


Method glTexCoord

void glTexCoord(float|int s, float|int|void t, float|int|void r, float|int|void q)
void glTexCoord(array(float|int) v)

Description

glTexCoord specifies texture coordinates in one, two, three, or four dimensions. glTexCoord sets the current texture coordinates to (s, 0, 0, 1); a call to glTexCoord sets them to (s, t, 0, 1). Similarly, glTexCoord specifies the texture coordinates as (s, t, r, 1), and glTexCoord defines all four components explicitly as (s, t, r, q).

The current texture coordinates are part of the data that is associated with each vertex and with the current raster position. Initially, the values for s, t, r, and q are (0, 0, 0, 1).

Parameter s
Parameter t
Parameter r
Parameter q

Specify s, t, r, and q texture coordinates. Not all parameters are present in all forms of the command.

Parameter v

Specifies an array of one, two, three, or four elements, which in turn specify the s, t, r, and q texture coordinates.

Note

The current texture coordinates can be updated at any time. In particular, glTexCoord can be called between a call to glBegin and the corresponding call to glEnd.

When the ARB_imaging extension is supported, glTexCoord always updates texture unit GL_TEXTURE0.

See also

glMultiTexCoord, glTexCoordPointer, glVertex