I am working through some beginner OpenGL tutorials, and the current one teaches how to apply a texture to a simple rectangle. The tutorial states tells me to set the texture parameters GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T to GL_CLAMP_TO_EDGE, however I am uncertain as to what this actually does. I am aware it is something to do with how textures larger/smaller than the space they are being mapped onto are handled, but I'm not sure what behavior this actually causes. What does GL_CLAMP_TO_EDGE do, and how is this different from GL_CLAMP, GL_CLAMP_TO_BORDER, GL_REPEAT? Thanks very much in advance, and bonus helpfulness if you can provide images for an idiot like me.
Well S and T just mean U and V (or X and Y if you prefer), or in GLSL:
The GL_REPEAT mode has textures repeat when you go past (0,0) to (1,1) range
The GL_CLAMP_TO_EDGE mode has textures stop at the last pixel when you fall off the edge.
The GL_CLAMP and GL_CLAMP_TO_BORDER are depreciated because all texture borders must be 0 pixels, so the modes don't make sense anymore. (somewhere around GL3 I believe)
There are some good examples on http://www.flipcode.com/archives/Advanced_OpenGL_Texture_Mapping.shtml, here is a preview:
Here is an extract of the OpenGL Reference page on glTexParameter as of 2014/02/07, formatted a bit for easier reading: