From a380f8d12e7cacabe69d2226463810f70d532580 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Feb 2009 18:07:21 +0000 Subject: [PATCH] tweaks --- direct/src/showutil/TexMemWatcher.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/direct/src/showutil/TexMemWatcher.py b/direct/src/showutil/TexMemWatcher.py index a844629e72..98f6e4c3ee 100644 --- a/direct/src/showutil/TexMemWatcher.py +++ b/direct/src/showutil/TexMemWatcher.py @@ -49,11 +49,17 @@ class TexMemWatcher(DirectObject): props, flags) assert self.win + # Set our GSG to a texture memory limit of 0. This will force + # it to unload any textures as soon as they are offscreen, so + # that our GSG's texture memory utilization will match that of + # the real GSG. + self.win.getGsg().getPreparedObjects().setGraphicsMemoryLimit(0) + # We don't need to clear the color buffer, since we'll be - # filling it with a texture. But we can clear the depth - # buffer; we use the depth buffer to cut a hole in the matte. + # filling it with a texture. We also don't need to clear the + # depth buffer, since we won't be using it. self.win.setClearColor(False) - self.win.setClearDepth(True) + self.win.setClearDepth(False) self.win.setWindowEvent('tex-mem-window') self.accept('tex-mem-window', self.windowEvent)