Răsfoiți Sursa

fix alt-tab

David Rose 24 ani în urmă
părinte
comite
7e59df5359
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      panda/src/gobj/texture.cxx

+ 6 - 1
panda/src/gobj/texture.cxx

@@ -232,7 +232,12 @@ load(const PNMImage &pnmimage) {
   if (!_pbuffer->load(pnmimage))
   if (!_pbuffer->load(pnmimage))
     return false;
     return false;
 
 
-  unprepare();
+  // It's not a good idea to call this here, since this function might
+  // be called from within the GSG itself--which won't expect the
+  // texture to suddenly unprepare itself.  Better to have the user
+  // explicitly unprepare() the texture if she loads a new file.
+  //  unprepare();
+
   return true;
   return true;
 }
 }