From 9e9e1eeef7bd69eff1d401f89bd02190f3711517 Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 18 Aug 2008 22:51:40 +0000 Subject: [PATCH] don't cache noncompressed textures inappropriately --- panda/src/gobj/texture.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 84b4a84e05..3823e31a30 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -2883,9 +2883,11 @@ reload_ram_image() { z, n, _has_read_pages, _has_read_mipmaps, false, NULL); if (has_ram_image() && record != (BamCacheRecord *)NULL) { - // Update the cache. - record->set_data(this, false); - cache->store(record); + if (cache->get_cache_textures() || (get_ram_image_compression() != CM_off && cache->get_cache_compressed_textures())) { + // Update the cache. + record->set_data(this, false); + cache->store(record); + } } }