mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
fix reload some more
This commit is contained in:
parent
6750577676
commit
f35a2d2a9a
@ -3027,6 +3027,8 @@ do_reload_ram_image(bool allow_compression) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_loaded_from_image = false;
|
_loaded_from_image = false;
|
||||||
|
Format orig_format = _format;
|
||||||
|
int orig_num_components = _num_components;
|
||||||
|
|
||||||
LoaderOptions options;
|
LoaderOptions options;
|
||||||
options.set_texture_flags(LoaderOptions::TF_preload);
|
options.set_texture_flags(LoaderOptions::TF_preload);
|
||||||
@ -3034,6 +3036,12 @@ do_reload_ram_image(bool allow_compression) {
|
|||||||
_primary_file_num_channels, _alpha_file_channel,
|
_primary_file_num_channels, _alpha_file_channel,
|
||||||
z, n, _has_read_pages, _has_read_mipmaps, options, NULL);
|
z, n, _has_read_pages, _has_read_mipmaps, options, NULL);
|
||||||
|
|
||||||
|
if (orig_num_components == _num_components) {
|
||||||
|
// Restore the original format, in case it was needlessly changed
|
||||||
|
// during the reload operation.
|
||||||
|
_format = orig_format;
|
||||||
|
}
|
||||||
|
|
||||||
if (do_has_ram_image() && record != (BamCacheRecord *)NULL) {
|
if (do_has_ram_image() && record != (BamCacheRecord *)NULL) {
|
||||||
if (cache->get_cache_textures() || (_ram_image_compression != CM_off && cache->get_cache_compressed_textures())) {
|
if (cache->get_cache_textures() || (_ram_image_compression != CM_off && cache->get_cache_compressed_textures())) {
|
||||||
// Update the cache.
|
// Update the cache.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user