[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glTexCoord Subroutine


Sets the current texture coordinates.


OpenGL C bindings library: libGL.a

C Syntax

void glTexCoord1d(GLdouble S)
void glTexCoord1f(GLfloat S)
void glTexCoord1i(GLint S)
void glTexCoord1s(GLshort S)
void glTexCoord2d(GLdouble S, 
      GLdouble T)
void glTexCoord2f(GLfloat S, 
     GLfloat T)
void glTexCoord2i(GLint S, 
     GLint T)
void glTexCoord2s(GLshort S, 
      GLshort T)
void glTexCoord3d(GLdouble S, 
      GLdouble T,
      GLdouble R)
void glTexCoord3f(GLfloat S, 
     GLfloat T,
     GLfloat R)
void glTexCoord3i(GLint S, 
     GLint T,
     GLint R)
void glTexCoord3s(GLshort S, 
      GLshort T,
      GLshort R)
void glTexCoord4d(GLdouble S, 
      GLdouble T,
      GLdouble R,
      GLdouble Q)
void glTexCoord4f(GLfloat S, 
     GLfloat T,
     GLfloat R,
     GLfloat Q)
void glTexCoord4i(GLint S, 
     GLint T,
     GLint R,
     GLint Q)
void glTexCoord4s(GLshort S, 
      GLshort T,
      GLshort R,
      GLshort Q)
void glTexCoord1dv(const GLdouble *V)
void glTexCoord1fv(const GLfloat *V)
void glTexCoord1iv(const GLint *V)
void glTexCoord1sv(const GLshort *V)
void glTexCoord2dv(const GLdouble *V)
void glTexCoord2fv(const GLfloat *V)
void glTexCoord2iv(const GLint *V)
void glTexCoord2sv(const GLshort *V)
void glTexCoord3dv(const GLdouble *V)
void glTexCoord3fv(const GLfloat *V)
void glTexCoord3iv(const GLint *V)
void glTexCoord3sv(const GLshort *V)
void glTexCoord4dv(const GLdouble *V)
void glTexCoord4fv(const GLfloat *V)
void glTexCoord4iv(const GLint *V)
void glTexCoord4sv(const GLshort *V)


S, T, R, Q Specify S, T, R, and A texture coordinates. Not all parameters are present in all forms of the command.
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.


The current texture coordinates are part of the data that is associated with polygon vertices. They are set with the glTexCoord subroutine.

The glTexCoord subroutine specifies texture coordinates in one, two, three, or four dimensions. The glTexCoord1 subroutine 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 can be updated at any time. In particular, the glTexCoord subroutine can be called between a call to glBegin and the corresponding call to glEnd.

Associated Gets

Associated gets for the glTexCoord subroutine are as follows. (See the glGet subroutine for more information.)

glGet with argument GL_CURRENT_TEXTURE_COORDS.


/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glTexCoordPointer subroutine, glTexCoordPointerEXT subroutine, glVertex subroutine.

OpenGL Overview.

[ Previous | Next | Contents | Glossary | Home | Search ]