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

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

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

revision 1.54 by tjl, Fri Nov 29 13:29:03 2002 UTC revision 1.55 by jvk, Sat Nov 30 09:23:57 2002 UTC
# Line 398  class BasisScene: Line 398  class BasisScene:
398          sp = 10          sp = 10
399          size = vs.getSize().height / 4 - 2*sp          size = vs.getSize().height / 4 - 2*sp
400          (w,h) = (size,size)          (w,h) = (size,size)
401            total = 0
402          for t in self.tex:          for t in self.tex:
403             vs.put(quad((t.getTexId())),  0, sp + x*(w+sp), sp + y*(h+sp), w, h)             vs.put(quad((t.getTexId())),  0, sp + x*(w+sp), sp + y*(h+sp), w, h)
404             x += 1             x += 1
405             if x>3:             if x>3:
406                  x = 0                  x = 0
407                  y += 1                  y += 1
408               pw = GL.getGLTexLevelParameterFloat("TEXTURE_2D", t.getTexId(), 0,
409                                                   "TEXTURE_WIDTH")[0]
410               ph = GL.getGLTexLevelParameterFloat("TEXTURE_2D", t.getTexId(), 0,
411                                                   "TEXTURE_HEIGHT")[0]
412               print "Size: %sx%s = %s" % (pw, ph, pw * ph)
413               total += pw * ph
414            print "Total size =", total
415    
416  scenebindings = {  scenebindings = {
417      "F1": PaperScene,      "F1": PaperScene,

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

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