Repeat a texture in OpenGL

When you want to repeat a small texture on a large quad without drawing the quads yourself.
Bind to the texture as usual and make sure you aren't clamping.
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_REPEAT);

The glTexCoord2f() controls how many times the texture is repeated. Image coordinates are typically from 0 to 1 in OpenGL. So the above calls repeat the texture 32 times in both the x and y directions.