creating a cubemap with mip levels was incorrect (#9382)

the miplevels where not specified with the correct size.
This commit is contained in:
Mathias Agopian
2025-10-30 09:29:33 -07:00
committed by GitHub
parent ea608d409e
commit ddb2d89e6c
+3 -2
View File
@@ -807,8 +807,9 @@ void OpenGLDriver::textureStorage(GLTexture* t,
for (GLint face = 0 ; face < 6 ; face++) {
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face,
level, GLint(t->gl.internalFormat),
GLsizei(width), GLsizei(height), 0,
format, type, nullptr);
std::max(GLsizei(1), GLsizei(width >> level)),
std::max(GLsizei(1), GLsizei(height >> level)),
0, format, type, nullptr);
}
} else {
glTexImage2D(t->gl.target, level, GLint(t->gl.internalFormat),