/[gzz]/gzz/gfx/demo/opengl/glinfo.py
ViewVC logotype

Diff of /gzz/gfx/demo/opengl/glinfo.py

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

revision 1.8 by jvk, Tue Oct 8 12:34:13 2002 UTC revision 1.9 by jvk, Tue Oct 8 15:12:29 2002 UTC
# Line 11  class InfoScene: Line 11  class InfoScene:
11      def scene(self, vs):      def scene(self, vs):
12          putnoc(vs, background(self.bgcolor))          putnoc(vs, background(self.bgcolor))
13    
14          cs1 = vs.coords.affineCoordsys(0, 10, 0, 0, 40, 0, 0, 40)          size = vs.getSize()
15    
16            colchars = 60
17            scale = min(size.width*1.0, size.height*4.0/3) / colchars
18    
19            cs1 = vs.coords.affineCoordsys(0, 10, 0, 0, scale, 0, 0, scale)
20          vs.matcher.add(cs1, "1")          vs.matcher.add(cs1, "1")
21    
22          vendor = GL.getGLString("VENDOR")          vendor = GL.getGLString("VENDOR")
# Line 114  class InfoScene: Line 119  class InfoScene:
119    
120              ]]              ]]
121                                        
122            # double size text
123          putText(vs, cs1, vendor, color=(0,0,0), h=.8, y = 1)          putText(vs, cs1, vendor, color=(0,0,0), h=2, y = 2)
124          putText(vs, cs1, renderer, color=(0,0,0), h=.8, y = 2)          putText(vs, cs1, renderer, color=(0,0,0), h=2, y = 4)
125          putText(vs, cs1, version, color=(0,0,0), h=.8, y = 3)          putText(vs, cs1, version, color=(0,0,0), h=2, y = 6)
126    
127          foo = params          foo = params
128          i = 0          i = 0
129          rows = 3          cols = 3
130          lines = (len(foo)+rows-1) / rows          lines = (len(foo)+cols-1) / cols
131          for x in range(0, rows):          for x in range(0, cols):
132              for y in range(0, lines):              for y in range(0, lines):
133                  if i >= len(foo): break                  if i >= len(foo): break
134                                    
135                  putText(vs, cs1, foo[i], color=(0,0,0), h=.32,                  putText(vs, cs1, foo[i], color=(0,0,0), h=1,
136                          x=x*(1200./40/rows), y=y*.5+4)                          x=x*(colchars/cols), y=y+8)
137                  i += 1                  i += 1
138    
139    
140    
141          foo = extensions.split();          foo = extensions.split();
142          i = 0          i = 0
143          rows = 4          cols = 4
144          lines = (len(foo)+rows-1) / rows          lines = (len(foo)+cols-1) / cols
145          for x in range(0, rows):          for x in range(0, cols):
146              for y in range(0, lines):              for y in range(0, lines):
147                  if i >= len(foo): break                  if i >= len(foo): break
148                                    
149                  putText(vs, cs1, foo[i], color=(0,0,0), h=.32,                  putText(vs, cs1, foo[i], color=(0,0,0), h=1,
150                          x=x*(1200./40/rows), y=y*.5+14)                          x=x*(colchars/cols), y=y+28)
151                  i += 1                  i += 1
152    
153          return vs          return vs

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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