Browse Source

async-load-delay for textures too

David Rose 17 years ago
parent
commit
8214dca456
1 changed files with 5 additions and 0 deletions
  1. 5 0
      panda/src/pgraph/textureReloadRequest.cxx

+ 5 - 0
panda/src/pgraph/textureReloadRequest.cxx

@@ -26,6 +26,11 @@ bool TextureReloadRequest::
 do_task() {
 do_task() {
   // Don't reload the texture if it doesn't need it.
   // Don't reload the texture if it doesn't need it.
   if (_texture_context->was_image_modified()) {
   if (_texture_context->was_image_modified()) {
+    double delay = async_load_delay;
+    if (delay != 0.0) {
+      Thread::sleep(delay);
+    }
+
     if (_allow_compressed) {
     if (_allow_compressed) {
       _texture->get_ram_image();
       _texture->get_ram_image();
     } else {
     } else {