mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
tweaks
This commit is contained in:
parent
163b4a0093
commit
a380f8d12e
@ -49,11 +49,17 @@ class TexMemWatcher(DirectObject):
|
|||||||
props, flags)
|
props, flags)
|
||||||
assert self.win
|
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
|
# We don't need to clear the color buffer, since we'll be
|
||||||
# filling it with a texture. But we can clear the depth
|
# filling it with a texture. We also don't need to clear the
|
||||||
# buffer; we use the depth buffer to cut a hole in the matte.
|
# depth buffer, since we won't be using it.
|
||||||
self.win.setClearColor(False)
|
self.win.setClearColor(False)
|
||||||
self.win.setClearDepth(True)
|
self.win.setClearDepth(False)
|
||||||
|
|
||||||
self.win.setWindowEvent('tex-mem-window')
|
self.win.setWindowEvent('tex-mem-window')
|
||||||
self.accept('tex-mem-window', self.windowEvent)
|
self.accept('tex-mem-window', self.windowEvent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user