mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
glgsg: fix assertion encountered when trying to use pointer textures
Fixes LP 990089
This commit is contained in:
parent
ce736ad093
commit
64a7fbab87
@ -1544,7 +1544,14 @@ INLINE size_t Texture::
|
||||
get_ram_mipmap_image_size(int n) const {
|
||||
CDReader cdata(_cycler);
|
||||
if (n >= 0 && n < (int)cdata->_ram_images.size()) {
|
||||
return cdata->_ram_images[n]._image.size();
|
||||
if (cdata->_ram_images[n]._pointer_image == nullptr) {
|
||||
return cdata->_ram_images[n]._image.size();
|
||||
} else {
|
||||
// Calculate it based on the given page size.
|
||||
return do_get_ram_mipmap_page_size(cdata, n) *
|
||||
do_get_expected_mipmap_z_size(cdata, n) *
|
||||
cdata->_num_views;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user