glTexCoord.3G man page

glTexCoord — set the current texture coordinates

C Specification

void glTexCoord1s(GLshort s);

void glTexCoord1i(GLint s);

void glTexCoord1f(GLfloat s);

void glTexCoord1d(GLdouble s);

void glTexCoord2s(GLshort s, GLshort t);

void glTexCoord2i(GLint s, GLint t);

void glTexCoord2f(GLfloat s, GLfloat t);

void glTexCoord2d(GLdouble s, GLdouble t);

void glTexCoord3s(GLshort s, GLshort t, GLshort r);

void glTexCoord3i(GLint s, GLint t, GLint r);

void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);

void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r);

void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);

void glTexCoord4i(GLint s, GLint t, GLint r, GLint q);

void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);

void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);


s, t, r, q

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



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.


glTexCoord specifies texture coordinates in one, two, three, or four dimensions. glTexCoord1 sets the current texture coordinates to s 0 0 1; a call to glTexCoord2 sets them to s t 0 1. Similarly, glTexCoord3 specifies the texture coordinates as s t r 1, and glTexCoord4 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).


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.

Associated Gets

glGet() with argument GL_CURRENT_TEXTURE_COORDS

See Also

glMultiTexCoord(), glTexCoordPointer, glVertex()


Referenced By

The man pages glTexCoord1d.3G(3), glTexCoord1dv.3G(3), glTexCoord1f.3G(3), glTexCoord1fv.3G(3), glTexCoord1i.3G(3), glTexCoord1iv.3G(3), glTexCoord1s.3G(3), glTexCoord1sv.3G(3), glTexCoord2d.3G(3), glTexCoord2dv.3G(3), glTexCoord2f.3G(3), glTexCoord2fv.3G(3), glTexCoord2i.3G(3), glTexCoord2iv.3G(3), glTexCoord2s.3G(3), glTexCoord2sv.3G(3), glTexCoord3d.3G(3), glTexCoord3dv.3G(3), glTexCoord3f.3G(3), glTexCoord3fv.3G(3), glTexCoord3i.3G(3), glTexCoord3iv.3G(3), glTexCoord3s.3G(3), glTexCoord3sv.3G(3), glTexCoord4d.3G(3), glTexCoord4dv.3G(3), glTexCoord4f.3G(3), glTexCoord4fv.3G(3), glTexCoord4i.3G(3), glTexCoord4iv.3G(3), glTexCoord4s.3G(3) and glTexCoord4sv.3G(3) are aliases of glTexCoord.3G(3).

02/10/2017 OpenGL Manual