implicitly reload if necessary on store()

This commit is contained in:
David Rose 2006-07-19 22:52:44 +00:00
parent 061e9c78f1
commit 49b673a886
1 changed files with 3 additions and 0 deletions

View File

@ -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);