Browse Source

Bring in some lines from the DX9 gsg to fix textures getting swapped to their simple form but not getting reloaded.

Mark Wojtowicz 15 years ago
parent
commit
3255e51f1d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

+ 4 - 0
panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx

@@ -298,6 +298,10 @@ upload_texture(DXTextureContext8 *dtc, bool force) {
     return false;
     return false;
   }
   }
 
 
+  dtc->delete_texture();
+  dtc->update_data_size_bytes(0);
+  dtc->mark_unloaded();
+  
   if (_effective_incomplete_render && !force) {
   if (_effective_incomplete_render && !force) {
     bool has_image = _supports_compressed_texture ? tex->has_ram_image() : tex->has_uncompressed_ram_image();
     bool has_image = _supports_compressed_texture ? tex->has_ram_image() : tex->has_uncompressed_ram_image();
     if (!has_image && tex->might_have_ram_image() &&
     if (!has_image && tex->might_have_ram_image() &&