From 49b673a886d8e21699e584702da9012cfb4f172f Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 19 Jul 2006 22:52:44 +0000 Subject: [PATCH] implicitly reload if necessary on store() --- panda/src/gobj/texture.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index daa1552318..8397e9c10e 100644 --- a/panda/src/gobj/texture.cxx +++ b/panda/src/gobj/texture.cxx @@ -2167,6 +2167,9 @@ do_load_one(const PNMImage &pnmimage, const string &name, int z, int n) { //////////////////////////////////////////////////////////////////// bool Texture:: do_store_one(PNMImage &pnmimage, int z, int n) const { + // First, reload the ram image if necessary. + ((Texture *)this)->get_ram_image(); + nassertr(has_ram_mipmap_image(n), false); nassertr(z >= 0 && z < get_expected_mipmap_z_size(n), false); nassertr(_ram_image_compression == CM_off, false);