/[gzz]/gzz/gfx/util/disp.py
ViewVC logotype

Diff of /gzz/gfx/util/disp.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jvk, Tue Mar 4 09:11:18 2003 UTC revision 1.3 by jvk, Tue Mar 4 09:19:36 2003 UTC
# Line 31  from java.io import File Line 31  from java.io import File
31    
32  System.setProperty("gzzclient", "gl")  System.setProperty("gzzclient", "gl")
33    
34  from gzz.client import GraphicsAPI  from gzz.client import AbstractBinder, GraphicsAPI
35  from gzz.gfx.gl import GL, GLRen, GLSpanner, Paper, GLCache  from gzz.gfx.gl import GL, GLRen, GLSpanner, Paper, GLCache
36            
37  from gfx.util.misc import *  from gfx.util.misc import *
# Line 49  while yt > 1: yt *= .5 Line 49  while yt > 1: yt *= .5
49    
50    
51  def filescene(vs, file):  def filescene(vs, file):
52      m = MipzipLoader(file)      m = MipzipLoader(File(file))
53      m.loadToBaseLevelSynch(0)      m.loadToBaseLevelSynch(0)
54      tex = m.getTexture()      tex = m.getTexture()
55      texid = tex.getTexId()      texid = tex.getTexId()
# Line 86  def filescene(vs, file): Line 86  def filescene(vs, file):
86      cs = vs.affineCS(0, "foo", 0, 0, 0, ys, 0, 0, ys)      cs = vs.affineCS(0, "foo", 0, 0, 0, ys, 0, 0, ys)
87      vs.map.put(l, cs)      vs.map.put(l, cs)
88    
89    class Bindings(AbstractBinder):
90        def keystroke(self, s):
91            print "KEY: '%s'"%s
92        def mouse(self, e):
93            print "MOUSE: '%s'"%e
94        def timeout(self, o):
95            print str(System.currentTimeMillis()) + " TIMEOUT ",o
96    
97  class Main(Runnable):  class Main(Runnable):
98    
# Line 94  class Main(Runnable): Line 101  class Main(Runnable):
101    
102          w = gfxapi.createWindow()          w = gfxapi.createWindow()
103          w.setLocation(0,0,xs,ys)          w.setLocation(0,0,xs,ys)
104            w.registerBinder(Bindings())
105    
106          file = File("tmp/tmp_0_0_0.mipzip")          for file in [
107          vs = w.createVobScene()              "tmp/tmp_0_0_0.mipzip",
108          filescene(vs, file)              "tmp/tmp_0_0_1.mipzip",
109          w.renderStill(vs, 0)              "tmp/tmp_0_0_2.mipzip",
110                "tmp/tmp_0_0_3.mipzip"
111                ]:
112                vs = w.createVobScene()
113                filescene(vs, file)
114                w.renderStill(vs, 0)
115                    
116    
117    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26