Parameters

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

C Specification

void glTexCoord1sv(

const GLshort *

v);

void glTexCoord1iv(

const GLint *

v);

void glTexCoord1fv(

const GLfloat *

v);

void glTexCoord1dv(

const GLdouble *

v);

void glTexCoord2sv(

const GLshort *

v);

void glTexCoord2iv(

const GLint *

v);

void glTexCoord2fv(

const GLfloat *

v);

void glTexCoord2dv(

const GLdouble *

v);

void glTexCoord3sv(

const GLshort *

v);

void glTexCoord3iv(

const GLint *

v);

void glTexCoord3fv(

const GLfloat *

v);

void glTexCoord3dv(

const GLdouble *

v);

void glTexCoord4sv(

const GLshort *

v);

void glTexCoord4iv(

const GLint *

v);

void glTexCoord4fv(

const GLfloat *

v);

void glTexCoord4dv(

const GLdouble *

v);

Parameters

v

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

Description

glTexCoord specifies texture coordinates in one, two, three, or four dimensions. glTexCoord1 sets the current texture coordinates to s001; a call to glTexCoord2 sets them to st01. Similarly, glTexCoord3 specifies the texture coordinates as str1, and glTexCoord4 defines all four components explicitly as strq.

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).

Notes

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.

docs.gl was written by Jorge Rodríguez. Each entry is under individual copyright displayed at the bottom of that entry. All other content is in the public domain. docs.gl is completely unaffiliated with OpenGL and Khronos. These pages were last compiled on 11 November 2017 at 03:57:36 GMT.