glTexCoord

set the current texture coordinates

Signature

glTexCoord( )->
glTexCoord( s , t )
glTexCoord1d( GLdouble ( s ) )-> void
glTexCoord1d( s )
glTexCoord1dv( const GLdouble * ( v ) )-> void
glTexCoord1dv( v )
glTexCoord1f( GLfloat ( s ) )-> void
glTexCoord1f( s )
glTexCoord1fv( const GLfloat * ( v ) )-> void
glTexCoord1fv( v )
glTexCoord1i( GLint ( s ) )-> void
glTexCoord1i( s )
glTexCoord1iv( const GLint * ( v ) )-> void
glTexCoord1iv( v )
glTexCoord1s( GLshort ( s ) )-> void
glTexCoord1s( s )
glTexCoord1sv( const GLshort * ( v ) )-> void
glTexCoord1sv( v )
glTexCoord2d( GLdouble ( s ) , GLdouble ( t ) )-> void
glTexCoord2d( s , t )
glTexCoord2dv( const GLdouble * ( v ) )-> void
glTexCoord2dv( v )
glTexCoord2f( GLfloat ( s ) , GLfloat ( t ) )-> void
glTexCoord2f( s , t )
glTexCoord2fv( const GLfloat * ( v ) )-> void
glTexCoord2fv( v )
glTexCoord2i( GLint ( s ) , GLint ( t ) )-> void
glTexCoord2i( s , t )
glTexCoord2iv( const GLint * ( v ) )-> void
glTexCoord2iv( v )
glTexCoord2s( GLshort ( s ) , GLshort ( t ) )-> void
glTexCoord2s( s , t )
glTexCoord2sv( const GLshort * ( v ) )-> void
glTexCoord2sv( v )
glTexCoord3d( GLdouble ( s ) , GLdouble ( t ) , GLdouble ( r ) )-> void
glTexCoord3d( s , t , r )
glTexCoord3dv( const GLdouble * ( v ) )-> void
glTexCoord3dv( v )
glTexCoord3f( GLfloat ( s ) , GLfloat ( t ) , GLfloat ( r ) )-> void
glTexCoord3f( s , t , r )
glTexCoord3fv( const GLfloat * ( v ) )-> void
glTexCoord3fv( v )
glTexCoord3i( GLint ( s ) , GLint ( t ) , GLint ( r ) )-> void
glTexCoord3i( s , t , r )
glTexCoord3iv( const GLint * ( v ) )-> void
glTexCoord3iv( v )
glTexCoord3s( GLshort ( s ) , GLshort ( t ) , GLshort ( r ) )-> void
glTexCoord3s( s , t , r )
glTexCoord3sv( const GLshort * ( v ) )-> void
glTexCoord3sv( v )
glTexCoord4d( GLdouble ( s ) , GLdouble ( t ) , GLdouble ( r ) , GLdouble ( q ) )-> void
glTexCoord4d( s , t , r , q )
glTexCoord4dv( const GLdouble * ( v ) )-> void
glTexCoord4dv( v )
glTexCoord4f( GLfloat ( s ) , GLfloat ( t ) , GLfloat ( r ) , GLfloat ( q ) )-> void
glTexCoord4f( s , t , r , q )
glTexCoord4fv( const GLfloat * ( v ) )-> void
glTexCoord4fv( v )
glTexCoord4i( GLint ( s ) , GLint ( t ) , GLint ( r ) , GLint ( q ) )-> void
glTexCoord4i( s , t , r , q )
glTexCoord4iv( const GLint * ( v ) )-> void
glTexCoord4iv( v )
glTexCoord4s( GLshort ( s ) , GLshort ( t ) , GLshort ( r ) , GLshort ( q ) )-> void
glTexCoord4s( s , t , r , q )
glTexCoord4sv( const GLshort * ( v ) )-> void
glTexCoord4sv( v )

Parameters

VariablesDescription
s, t, r, q
Specify s , t , r , and q 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.

Description

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

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

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glTexCoord
OpenGLContext tests/redbook_surface_cb.py Lines: 158
glTexCoord1f
Visvis wibjects/colorWibjects.py Lines: 680, 681, 682, 683
glTexCoord2d
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson19.py Lines: 155, 156, 157, 158
glTexCoord2dv
OpenGLContext OpenGLContext/scenegraph/indexedfaceset.py Lines: 592, 626
glTexCoord2f
OpenGLContext tests/nehe6_compressed.py Lines: 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 80, 81, 83, 84, 85, 86...
OpenGLContext tests/nehe8.py Lines: 187, 188, 189, 190, 193, 194, 195, 196, 199, 200, 201, 202, 205, 206, 207, 208, 211, 212, 213, 214...
OpenGLContext tests/nehe6_convolve.py Lines: 162, 163, 164, 165, 167, 168, 169, 170, 172, 173, 174, 175, 177, 178, 179, 180, 182, 183, 184, 185...
OpenGLContext tests/nehe7.py Lines: 181, 182, 183, 184, 187, 188, 189, 190, 193, 194, 195, 196, 199, 200, 201, 202, 205, 206, 207, 208...
OpenGLContext tests/nehe6_timer.py Lines: 106, 107, 108, 109, 111, 112, 113, 114, 116, 117, 118, 119, 121, 122, 123, 124, 126, 127, 128, 129...
OpenGLContext tests/nehe6.py Lines: 92, 93, 94, 95, 97, 98, 99, 100, 102, 103, 104, 105, 107, 108, 109, 110, 112, 113, 114, 115...
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson11.py Lines: 97, 102, 107, 111
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 146, 147, 148, 149, 152, 153, 154, 155, 158, 159, 160, 161, 164, 165, 166, 167, 170, 171, 172, 173...
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson6.py Lines: 128, 129, 130, 131, 134, 135, 136, 137, 140, 141, 142, 143, 146, 147, 148, 149, 152, 153, 154, 155...
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson41.py Lines: 229, 230, 231, 232, 242, 243, 244, 245, 252, 253, 254, 255, 262, 263, 264, 265, 272, 273, 274, 275
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson16.py Lines: 111, 112, 113, 114, 117, 118, 119, 120, 123, 124, 125, 126, 129, 130, 131, 132, 135, 136, 137, 138...
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 98, 99, 100, 101, 105, 106, 107, 108, 112, 113, 114, 115, 119, 120, 121, 122, 126, 127, 128, 129...
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 121, 124, 127, 130
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson12.py Lines: 78, 79, 80, 81, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 95, 96, 98, 99, 100, 101...
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson42.py Lines: 304, 305, 306, 307, 329, 330, 331, 332
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson44/glFont.py Lines: 56, 58, 60, 62
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson44/glCamera.py Lines: 703, 705, 707, 709
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson43/glFreeType.py Lines: 160, 161, 162, 163
OpenGL-Demo PyOpenGL-Demo/proesch/shaderProg/textureShader.py Lines: 138, 140, 142, 144
OpenGL-Demo PyOpenGL-Demo/proesch/simpleTexture/texturedQuad.py Lines: 55, 57, 59, 61
OpenGL-Demo PyOpenGL-Demo/dek/tile.py Lines: 37, 38, 39, 40
{LGPL} PyUI2 renderers/openglBase.py Lines: 185, 187, 189, 191, 230, 232, 234, 236
{LGPL} PyUI2 renderers/openglPygame.py Lines: 297, 299, 301, 303
{LGPL} PyUI2 system/openglgraphics.py Lines: 157, 159, 161, 163, 349, 351, 353, 355
{LGPL} VisionEgg VisionEgg/SphereMap.py Lines: 475, 478, 481, 484, 757, 760, 763, 766, 1117, 1120, 1123, 1126
{LGPL} VisionEgg VisionEgg/Gratings.py Lines: 411, 414, 417, 420, 700, 703, 706, 709
{LGPL} VisionEgg VisionEgg/Textures.py Lines: 1496, 1499, 1502, 1505, 1608, 1611, 1614, 1617, 1830, 1833, 1836, 1839, 1855, 1858, 1861, 1864, 1869, 1872, 1875, 1878...
{LGPL} PyMT pymt/graphx/draw.py Lines: 362, 365, 368, 371, 380, 382, 384, 386
{LGPL} Pyggel pyggel/image.py Lines: 65, 68, 71, 74, 207, 210, 213, 216
{LGPL} Pyggel pyggel/misc.py Lines: 313, 317
{LGPL} Pyggel pyggel/geometry.py Lines: 210, 212, 214, 216, 219, 221, 223, 225, 270, 272, 274, 276, 279, 281, 283, 285, 433
{LGPL} pygl2d pygl2d/image.py Lines: 137, 138, 139, 140
{GPL} Scocca scocca/graphics/opengl/draw.py Lines: 58
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/Particles3D.py Lines: 521, 523, 525, 527, 530, 532, 534, 536
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 871, 872, 873, 874
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/PygameWrapper.py Lines: 194, 196, 198, 200
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/Button.py Lines: 175, 177, 179, 181, 184, 186, 188, 190
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/TexPlane.py Lines: 101, 102, 103, 104
{LGPL or GPL or MPL} Kamaelia Code/Python/Kamaelia/Kamaelia/UI/OpenGL/Label.py Lines: 150, 152, 154, 156, 159, 161, 163, 165
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Utils/Particles3D.py Lines: 257, 259, 261, 263, 266, 269, 272, 275
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 207, 208, 209, 210, 214, 215, 216, 217, 220, 221, 222, 223, 226, 227, 228, 229, 232, 233, 234, 235...
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 849, 850, 851, 852
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/PygameWrapper.py Lines: 194, 196, 198, 200
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/Button.py Lines: 179, 181, 183, 185, 188, 191, 194, 197
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/TexPlane.py Lines: 101, 102, 103, 104
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Kamaelia/UI/OpenGL/Label.py Lines: 150, 152, 154, 156, 159, 161, 163, 165
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Button3D.py Lines: 219, 221, 223, 225, 228, 230, 232, 234
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/PygameWrapperPlane.py Lines: 159, 160, 161, 162
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/TexPlane.py Lines: 149, 150, 151, 152
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/Display3D.py Lines: 487, 488, 489, 490
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Button.py Lines: 107, 109, 111, 113, 116, 118, 120, 122
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/PygameWrapperPlane.py Lines: 80, 82, 84, 86
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/TexPlane.py Lines: 62, 63, 64, 65
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/THF/Sketches/playground/Display3D.py Lines: 538, 539, 540, 541
{LGPL or GPL or MPL} Kamaelia Sketches/MH/OpenGL/3dFolding.py Lines: 141
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/Particles3D.py Lines: 521, 523, 525, 527, 530, 532, 534, 536
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 871, 872, 873, 874
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/PygameWrapper.py Lines: 194, 196, 198, 200
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/Button.py Lines: 175, 177, 179, 181, 184, 186, 188, 190
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/TexPlane.py Lines: 101, 102, 103, 104
{LGPL or GPL or MPL} Kamaelia Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/UI/OpenGL/Label.py Lines: 150, 152, 154, 156, 159, 161, 163, 165
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Button3D.py Lines: 219, 221, 223, 225, 228, 230, 232, 234
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/PygameWrapperPlane.py Lines: 159, 160, 161, 162
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/TexPlane.py Lines: 149, 150, 151, 152
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/Display3D.py Lines: 487, 488, 489, 490
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Button.py Lines: 107, 109, 111, 113, 116, 118, 120, 122
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/PygameWrapperPlane.py Lines: 80, 82, 84, 86
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/TexPlane.py Lines: 62, 63, 64, 65
{LGPL or GPL or MPL} Kamaelia Sketches/THF/3D/playground/Display3D.py Lines: 538, 539, 540, 541
{LGPL or GPL or MPL} Kamaelia Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/OpenGLDisplay.py Lines: 848, 849, 850, 851
{LGPL or GPL or MPL} Kamaelia Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/PygameWrapper.py Lines: 194, 196, 198, 200
{LGPL or GPL or MPL} Kamaelia Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/Button.py Lines: 175, 177, 179, 181, 184, 186, 188, 190
{LGPL or GPL or MPL} Kamaelia Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/TexPlane.py Lines: 101, 102, 103, 104
{LGPL or GPL or MPL} Kamaelia Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/Label.py Lines: 150, 152, 154, 156, 159, 161, 163, 165
Visvis wobjects/textures.py Lines: 572, 573, 574, 575
Visvis wobjects/sliceTextures.py Lines: 254, 255, 256, 257
glTexCoord2fv
{LGPL} Pyggel pyggel/geometry.py Lines: 128, 563, 636
{LGPL} Pyggel pyggel/mesh.py Lines: 151
glTexCoord3f
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 106
{GPL3} OpenGL-Programmable 01-direct.py Lines: 95

MathML Rendering

Powered by MathJax