/[gzz]/gzz/gfx/demo/mipzip.py
ViewVC logotype

Diff of /gzz/gfx/demo/mipzip.py

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

revision 1.4 by tjl, Sat Jan 18 13:30:58 2003 UTC revision 1.5 by tjl, Sat Jan 18 15:18:21 2003 UTC
# Line 15  from gzz.client import AbstractUpdateMan Line 15  from gzz.client import AbstractUpdateMan
15    
16  class Scene:  class Scene:
17      def __init__(self):      def __init__(self):
18          self.mem = MemoryPartitioner(4 * 1024 * 1024)          self.mem = MemoryPartitioner(32 * 1024 * 1024)
19          self.files = []          self.files = []
20          self.tex = []          self.tex = []
21          for f in glob.glob("../mstmpimg/*.mipzip")[0:5]:          for f in glob.glob("../mstmpimg/*.mipzip"):
22              ml = MipzipLoader(File(f))              ml = MipzipLoader(File(f))
23              # ml.loadToBaseLevelSynch(0)              # ml.loadToBaseLevelSynch(0)
24              mc = MipzipMemoryConsumer(self.mem, ml)              mc = MipzipMemoryConsumer(self.mem, ml)
# Line 44  class Scene: Line 44  class Scene:
44              TexCoord %(x1)s %(y0)s              TexCoord %(x1)s %(y0)s
45              Vertex 1 0              Vertex 1 0
46              End              End
47          """ % { "x0" : .25, "y0" : .25, "x1": .5, "y1":.5 })          """ % { "x0" : .25, "y0" : .25, "x1": .3, "y1":.3 })
48      def scene(self, vs):      def scene(self, vs):
49          vs.map.put(background((.3,.7,.8)))          vs.map.put(background((.3,.7,.8)))
50          AbstractUpdateManager.setNoAnimation()          AbstractUpdateManager.setNoAnimation()
         w = vs.size.width / self.nrows  
51          h = vs.size.height / self.nrows          h = vs.size.height / self.nrows
52            w = h
53            print "S"
54          # print "Sc:",len(self.files)          # print "Sc:",len(self.files)
55          for x in range(0, self.nrows):          for x in range(0, self.nrows):
56              for y in range(0, self.nrows):              for y in range(0, self.nrows):
# Line 71  class Scene: Line 72  class Scene:
72          self.x = ev.getX()          self.x = ev.getX()
73          self.y = ev.getY()          self.y = ev.getY()
74          print self.x, self.y          print self.x, self.y
75            AbstractUpdateManager.chg()
76                    
77      def key(self, key):      def key(self, key):
78          return          return

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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