Textures are mapped to the geometry
by specifying a texture coordinate for
each vertex.
Texture coordinates are typically
specified as floating point values that are in a range between 0.0 and 1.0.
Texture coordinates are named
s, t, r, and
q:
- s for 1D texture coordinates
- [s, t]T for
2D texture coordinates (occasionally, [u, v]T)
- [s, t, r]T for
3D texture coordinates
- [s, t, r, q]T for
4D texture coordinates

Textures
are mapped by specifying a texture coordinate for each vertex. OpenGL
will stretch or shrink the texture as necessary to apply the texture to the
model.
During
rasterisation, 3D primitives are projected to the camera. For each fragment, texture coordinates
calculated through interpolation. Texels
are looked up in the texture and applied to colour the object in the
framebuffer.
Texture
coordinates are vertex attributes (like normals) that are passed to the GPU
using a VBO.