summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/video/VFile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-09-01 14:45:57 (GMT)
committerGuido van Rossum <guido@python.org>1992-09-01 14:45:57 (GMT)
commite0be2b36b61078258213d1ddc7318bb4887ede28 (patch)
tree4ffc4064d1d26fb598759404d9172e5588b56783 /Demo/sgi/video/VFile.py
parent61700bb985ce2708f489dae6397cf4be3e934d1a (diff)
downloadcpython-e0be2b36b61078258213d1ddc7318bb4887ede28.zip
cpython-e0be2b36b61078258213d1ddc7318bb4887ede28.tar.gz
cpython-e0be2b36b61078258213d1ddc7318bb4887ede28.tar.bz2
Added a clear() method to VFile class, to be called when the window
receives a REDRAW event
Diffstat (limited to 'Demo/sgi/video/VFile.py')
-rwxr-xr-xDemo/sgi/video/VFile.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Demo/sgi/video/VFile.py b/Demo/sgi/video/VFile.py
index b16b2ab..e43bd94 100755
--- a/Demo/sgi/video/VFile.py
+++ b/Demo/sgi/video/VFile.py
@@ -122,16 +122,18 @@ class VFile:
if not self.quiet:
sys.stderr.write('Initializing color map...')
self.initcmap()
+ self.clear()
if not self.quiet:
sys.stderr.write(' Done.\n')
+
+ def clear(self):
if self.offset == 0:
gl.color(0x800)
gl.clear()
self.mask = 0x7ff
else:
self.mask = 0xfff
- gl.clear()
-
+ gl.clear()
def initcmap(self):
maxbits = gl.getgdesc(GL.GD_BITS_NORM_SNG_CMODE)