mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
glgsg: Fix regression defining null mipmap levels of cube map
Fixes #1189
This commit is contained in:
parent
b8c53be8fd
commit
523e1bcbb8
@ -14242,7 +14242,8 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload,
|
||||
size_t page_size = tex->get_ram_mipmap_page_size(n);
|
||||
for (int z = 0; z < 6; ++z) {
|
||||
GLenum page_target = GL_TEXTURE_CUBE_MAP_POSITIVE_X + z;
|
||||
const unsigned char *page_ptr = image_ptr + page_size * z;
|
||||
const unsigned char *page_ptr =
|
||||
(image_ptr != nullptr) ? image_ptr + page_size * z : nullptr;
|
||||
|
||||
if (image_compression == Texture::CM_off) {
|
||||
glTexImage2D(page_target, n - mipmap_bias, internal_format,
|
||||
|
Loading…
x
Reference in New Issue
Block a user