<<< Texture binding, revisited | Index | Texture wrap parameters >>> |
Before we made our texture active, we set a number of preferences:
// Set the preferences: glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT );
Here, GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T are texture parameters. They indicate how the texture coordinates should be repeated or clamped to the range of the texture image. The goal is to make sure the shader does not attempt to access texels outside of the actual texture image.
<<< Texture binding, revisited | Index | Texture wrap parameters >>> |