瀏覽代碼

support opt-4 build

David Rose 17 年之前
父節點
當前提交
3e35ee9a24
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      direct/src/showutil/TexMemWatcher.py

+ 5 - 3
direct/src/showutil/TexMemWatcher.py

@@ -442,7 +442,8 @@ class TexMemWatcher(DirectObject):
         self.canvas.show()
         self.canvas.show()
         self.canvasBackground.clearColor()
         self.canvasBackground.clearColor()
         self.win.getGsg().setTextureQualityOverride(Texture.QLDefault)
         self.win.getGsg().setTextureQualityOverride(Texture.QLDefault)
-        self.gsg.clearFlashTexture()
+        if hasattr(self.gsg, 'clearFlashTexture'):
+            self.gsg.clearFlashTexture()
 
 
         if not tr:
         if not tr:
             return
             return
@@ -456,8 +457,9 @@ class TexMemWatcher(DirectObject):
         # Show the texture in all its filtered glory.
         # Show the texture in all its filtered glory.
         self.win.getGsg().setTextureQualityOverride(Texture.QLBest)
         self.win.getGsg().setTextureQualityOverride(Texture.QLBest)
 
 
-        # Start the texture flashing in the main window.
-        self.gsg.setFlashTexture(tr.tex)
+        if hasattr(self.gsg, 'setFlashTexture'):
+            # Start the texture flashing in the main window.
+            self.gsg.setFlashTexture(tr.tex)
 
 
         self.isolate = self.render2d.attachNewNode('isolate')
         self.isolate = self.render2d.attachNewNode('isolate')