Follow Excellent, Success will Chase you

0%

OpenGL纹理——Cubemap Texture

A Cubemap Texture is a texture, where each mipmap level consists of six 2D images which must be square. The 6 images represent the faces of a cube. The texture coordinate used to access a cubemap is a 3D direction vector which represents a direction from the center of the cube to the value to be accessed.
https://www.khronos.org/opengl/wiki/Cubemap_Texture

error

1
Mesa: User error: GL_INVALID_ENUM in glSamplerParameteri(pname=GL_TEXTURE_CUBE_MAP_SEAMLESS)
  • 错误打印
    1
    2
    3
    case INVALID_PNAME:
    _mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteri(pname=%s)\n",
    _mesa_enum_to_string(pname));

mesa:src/mesa/main/samplerobj.c

  • 错误函数
    1
    glSamplerParameteri(state->ids[i], GL_TEXTURE_CUBE_MAP_SEAMLESS, templ->seamless_cube_map);

GL_TEXTURE_CUBE_MAP_SEAMLESS

1
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);

立方体贴图的边界利用相邻面线性差值,消除立方体边缘的缝隙

参考

-------------本文结束感谢您的阅读-------------
  • 本文作者: Winddoing
  • 本文链接: https://winddoing.github.io/post/43690.html
  • 作者声明: 本博文为个人笔记, 由于个人能力有限,难免出现错误,欢迎大家批评指正。
  • 版权声明: 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!