<<< Texture preferences | Index | Texture wrap parameters, cont. >>> |
The GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T parameters control the way texture coordinates outside the range [ 0, 1 ] are handled by OpenGL for the S and T texture coordinates.
If UV texture coordinates are out of range [ 0, 1 ], the client program can modify the "wrapping" behavior by calling glTexParameterf(). For example,
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
GL_REPEAT is the texture parameter value. Possible values are
GL_REPEAT // the texture is wrapped and infinitely repeated T ^ GL_MIRRORED_REPEAT // the texture is repeated in a mirrored fashion | GL_CLAMP_TO_EDGE // use pixels on texture edge outside [ 0, 1 ] range | GL_CLAMP_TO_BORDER // use constant border color outside [ 0, 1 ] range +-----> S
<<< Texture preferences | Index | Texture wrap parameters, cont. >>> |