One trick that we can use a texture transformation for is to make sure that a texture is always applied at the same scale, as an object is transformed.
If we apply a texture to an object normally, and then scale the object, the texture appears to stretch:
By applying the same scaling to the texture coordinates as to the geometry, the texture "grows", and does not stretch:
glMatrixMode(GL_TEXTURE); glLoadIdentity(); glScalef(size, 1, 1); glMatrixMode(GL_MODELVIEW); glScalef(size, 1, 1);