mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
gobj: Fix Texture.set_ram_image_as for 3D and multiview textures
Fixes #1095
This commit is contained in:
parent
2b8711e25e
commit
3a41db130b
@ -1023,7 +1023,8 @@ set_ram_image_as(CPTA_uchar image, const string &supplied_format) {
|
||||
string format = upcase(supplied_format);
|
||||
|
||||
// Make sure we can grab something that's uncompressed.
|
||||
int imgsize = cdata->_x_size * cdata->_y_size;
|
||||
size_t imgsize = (size_t)cdata->_x_size * (size_t)cdata->_y_size *
|
||||
(size_t)cdata->_z_size * (size_t)cdata->_num_views;
|
||||
nassertv(image.size() == (size_t)(cdata->_component_width * format.size() * imgsize));
|
||||
|
||||
// Check if the format is already what we have internally.
|
||||
|
Loading…
x
Reference in New Issue
Block a user