From 9edbdbf6c9beaa074dafac3a71876a9819c601dc Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 24 Jan 2026 10:17:10 +0100 Subject: [PATCH] glgsg: Fix mipmap level depth when uploading 3D textures --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index ba8741bd0f..40ed2a61e8 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -14919,6 +14919,7 @@ upload_texture_view(CLP(TextureContext) *gtc, int view, bool needs_reload, int width = tex->get_expected_mipmap_x_size(n); int height = tex->get_expected_mipmap_y_size(n); + int depth = tex->get_expected_mipmap_z_size(n); // we grab the mipmap pointer first, if it is NULL we grab the normal // mipmap image pointer which is a PTA_uchar