Просмотр исходного кода

glgsg: Fix mipmap level depth when uploading 3D textures

rdb 6 дней назад
Родитель
Сommit
9edbdbf6c9
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 1 - 0
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 width = tex->get_expected_mipmap_x_size(n);
     int height = tex->get_expected_mipmap_y_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
     // we grab the mipmap pointer first, if it is NULL we grab the normal
     // mipmap image pointer which is a PTA_uchar
     // mipmap image pointer which is a PTA_uchar