mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Fix mipmap level count calculation for texture arrays
This commit is contained in:
parent
bb684b2a07
commit
844a284925
@ -5672,7 +5672,10 @@ do_set_simple_ram_image(CData *cdata, CPTA_uchar image, int x_size, int y_size)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int Texture::
|
||||
do_get_expected_num_mipmap_levels(const CData *cdata) const {
|
||||
int size = max(cdata->_x_size, max(cdata->_y_size, cdata->_z_size));
|
||||
int size = max(cdata->_x_size, cdata->_y_size);
|
||||
if (cdata->_texture_type == Texture::TT_3d_texture) {
|
||||
size = max(size, cdata->_z_size);
|
||||
}
|
||||
int count = 1;
|
||||
while (size > 1) {
|
||||
size >>= 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user