summaryrefslogtreecommitdiffstats
path: root/Demo/sgi/video/VFile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-06-10 13:32:32 (GMT)
committerGuido van Rossum <guido@python.org>1993-06-10 13:32:32 (GMT)
commitfa04170682a1b361d874937a541e57dbc16115a5 (patch)
treedbf5014bf68912417d2d48dc45a4cd425f090434 /Demo/sgi/video/VFile.py
parent672754a4880eb204ad4351b3f3b473bacf78651e (diff)
downloadcpython-fa04170682a1b361d874937a541e57dbc16115a5.zip
cpython-fa04170682a1b361d874937a541e57dbc16115a5.tar.gz
cpython-fa04170682a1b361d874937a541e57dbc16115a5.tar.bz2
VCR.py: Use unix files instead of stdio files for tty communication,
because of buffering. Also added several new commands (Jack). VFile.py: Made setting of RGB or colormap mode separate methods, so they can be overridden (e.g. when using the Glx.draw widget the way to change the mode is totally different).
Diffstat (limited to 'Demo/sgi/video/VFile.py')
-rwxr-xr-xDemo/sgi/video/VFile.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/Demo/sgi/video/VFile.py b/Demo/sgi/video/VFile.py
index 016115a..f04d93b 100755
--- a/Demo/sgi/video/VFile.py
+++ b/Demo/sgi/video/VFile.py
@@ -442,8 +442,7 @@ class Displayer(VideoParams):
self.color0 = None
self.fixcolor0 = 0
if self.format in ('rgb', 'jpeg', 'compress'):
- gl.RGBmode()
- gl.gconfig()
+ self.set_rgbmode()
gl.RGBcolor(200, 200, 200) # XXX rather light grey
gl.clear()
return
@@ -456,8 +455,7 @@ class Displayer(VideoParams):
gl.clear()
gl.pixmode(GL.PM_SIZE, 8)
return
- gl.cmode()
- gl.gconfig()
+ self.set_cmode()
self.skipchrom = 0
if self.offset == 0:
self.mask = 0x7ff
@@ -470,6 +468,18 @@ class Displayer(VideoParams):
if not self.quiet:
sys.stderr.write(' Done.\n')
+ # Set the window in RGB mode (may be overridden for Glx window)
+
+ def set_rgbmode(self):
+ gl.RGBmode()
+ gl.gconfig()
+
+ # Set the window in colormap mode (may be overridden for Glx window)
+
+ def set_cmode(self):
+ gl.cmode()
+ gl.gconfig()
+
# Clear the window to a default color
def clear(self):