glTexImage2D函数中的border是什么意思?

发布于 2024-07-22 06:17:41 字数 126 浏览 2 评论 0原文

glTexImage2Dborder 值是多少? 它要么是0,要么是1。它决定这个纹理是否有边框吗?

border 值在哪里设置?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

岁月打碎记忆 2024-07-29 06:17:41

是的,边框值指示纹理是否有边框。

边框的颜色是通过调用 glTexParameter() 以及 GL_TEXTURE_BORDER_COLOR 参数来定义的。 默认情况下,它是黑色的。

请注意,仅当使用夹紧(GL_CLAMP 等)映射纹理时才使用边框颜色 - 边框对于重复图案没有意义,并且当对纹理数据使用线性插值时(GL_LINEAR 及类似)。

另请注意,OpenGL 的 OpenGL ES 变体(针对嵌入式系统)不支持纹理边框。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文