What is the border value of glTexImage2D? It's either 0 or 1. It referencies that if this texture will just have border or not?
Where is the borders values set?
What is the border value of glTexImage2D? It's either 0 or 1. It referencies that if this texture will just have border or not?
Where is the borders values set?
Yes, the border value indicates whether the texture would have a border or not.
The border's color is defined by a call to glTexParameter()
, with the GL_TEXTURE_BORDER_COLOR
parameter. By default, it is black.
Note that the border color is only used when the texture is mapped using clamping (GL_CLAMP
and similar) - a border doesn't make sense for a repeating pattern, and when linear interpolation is used for the texture data (GL_LINEAR
and similar).
Also note that a texture border is not supported in the OpenGL ES variants of OpenGL (for embedded systems).