What does border mean in the glTexImage2D function?
Asked Answered
E

1

5

What is the border value of glTexImage2D? It's either 0 or 1. Does it decide whether this texture will have a border or not?

Where is the border values set?

Everyone answered 27/5, 2009 at 3:24 Comment(0)
U
8

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).

Universalize answered 1/6, 2009 at 5:2 Comment(1)
Modern desktop OpenGL versions also don't support texture borders: they generate GL_INVALID_VALUE if border!=0.Matrices

© 2022 - 2024 — McMap. All rights reserved.