Browse Source

show-tex-mem

David Rose 17 years ago
parent
commit
932da28ac1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      direct/src/showbase/ShowBase.py

+ 4 - 2
direct/src/showbase/ShowBase.py

@@ -368,8 +368,6 @@ class ShowBase(DirectObject.DirectObject):
 
 
         if self.windowType != 'none':
         if self.windowType != 'none':
             self.__doStartDirect()
             self.__doStartDirect()
-            if self.config.GetBool('show-tex-mem', False):
-                self.toggleTexMem()
 
 
         taskMgr.finalInit()
         taskMgr.finalInit()
 
 
@@ -791,6 +789,10 @@ class ShowBase(DirectObject.DirectObject):
             self.setFrameRateMeter(self.config.GetBool(
             self.setFrameRateMeter(self.config.GetBool(
                 'show-frame-rate-meter', 0))
                 'show-frame-rate-meter', 0))
 
 
+            if self.config.GetBool('show-tex-mem', False):
+                if not self.texmem or self.texmem.cleanedUp:
+                    self.toggleTexMem()
+
         return success
         return success
 
 
     def setSleep(self, amount):
     def setSleep(self, amount):