[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/util disp.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/util disp.py |
Date: |
Tue, 04 Mar 2003 04:19:37 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 03/03/04 04:19:37
Modified files:
gfx/util : disp.py
Log message:
register binder
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/util/disp.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gzz/gfx/util/disp.py
diff -u gzz/gfx/util/disp.py:1.2 gzz/gfx/util/disp.py:1.3
--- gzz/gfx/util/disp.py:1.2 Tue Mar 4 04:11:18 2003
+++ gzz/gfx/util/disp.py Tue Mar 4 04:19:36 2003
@@ -31,7 +31,7 @@
System.setProperty("gzzclient", "gl")
-from gzz.client import GraphicsAPI
+from gzz.client import AbstractBinder, GraphicsAPI
from gzz.gfx.gl import GL, GLRen, GLSpanner, Paper, GLCache
from gfx.util.misc import *
@@ -49,7 +49,7 @@
def filescene(vs, file):
- m = MipzipLoader(file)
+ m = MipzipLoader(File(file))
m.loadToBaseLevelSynch(0)
tex = m.getTexture()
texid = tex.getTexId()
@@ -86,6 +86,13 @@
cs = vs.affineCS(0, "foo", 0, 0, 0, ys, 0, 0, ys)
vs.map.put(l, cs)
+class Bindings(AbstractBinder):
+ def keystroke(self, s):
+ print "KEY: '%s'"%s
+ def mouse(self, e):
+ print "MOUSE: '%s'"%e
+ def timeout(self, o):
+ print str(System.currentTimeMillis()) + " TIMEOUT ",o
class Main(Runnable):
@@ -94,11 +101,17 @@
w = gfxapi.createWindow()
w.setLocation(0,0,xs,ys)
+ w.registerBinder(Bindings())
- file = File("tmp/tmp_0_0_0.mipzip")
- vs = w.createVobScene()
- filescene(vs, file)
- w.renderStill(vs, 0)
+ for file in [
+ "tmp/tmp_0_0_0.mipzip",
+ "tmp/tmp_0_0_1.mipzip",
+ "tmp/tmp_0_0_2.mipzip",
+ "tmp/tmp_0_0_3.mipzip"
+ ]:
+ vs = w.createVobScene()
+ filescene(vs, file)
+ w.renderStill(vs, 0)
- [Gzz-commits] gzz/gfx/util disp.py, Janne V. Kujala, 2003/03/04
- [Gzz-commits] gzz/gfx/util disp.py,
Janne V. Kujala <=
- [Gzz-commits] gzz/gfx/util disp.py, Janne V. Kujala, 2003/03/04
- [Gzz-commits] gzz/gfx/util disp.py, Janne V. Kujala, 2003/03/04
- [Gzz-commits] gzz/gfx/util disp.py, Janne V. Kujala, 2003/03/04
- [Gzz-commits] gzz/gfx/util disp.py, Janne V. Kujala, 2003/03/05
- [Gzz-commits] gzz/gfx/util disp.py, Janne V. Kujala, 2003/03/05