cpython/Demo/sgi/sv/simpleinput.py

23 lines
500 B
Python
Raw Normal View History

1992-09-03 17:01:36 +00:00
import sv, SV
import gl, DEVICE
def main():
gl.foreground()
gl.prefsize(SV.PAL_XMAX, SV.PAL_YMAX)
win = gl.winopen('video test')
v = sv.OpenVideo()
params = [SV.VIDEO_MODE, SV.COMP, SV.BROADCAST, SV.PAL]
v.SetParam(params)
v.BindGLWindow(win, SV.IN_REPLACE)
gl.qdevice(DEVICE.ESCKEY)
gl.qdevice(DEVICE.WINQUIT)
gl.qdevice(DEVICE.WINSHUT)
while 1:
dev, val = gl.qread()
if dev in (DEVICE.ESCKEY, DEVICE.WINSHUT, DEVICE.WINQUIT):
v.CloseVideo()
gl.winclose(win)
return
main()