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

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

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

revision 1.1 by tjl, Fri Oct 18 14:02:14 2002 UTC revision 1.2 by tjl, Fri Oct 18 14:09:06 2002 UTC
# Line 27  class CScene: Line 27  class CScene:
27              Disable BLEND              Disable BLEND
28              Begin LINE_STRIP              Begin LINE_STRIP
29          """          """
30          alim = 0.1          alim = 0.075
31          for vert in v:          for vert in v:
32              ax = min(vert[0], 1-vert[0])              ax = min(vert[0], 1-vert[0])
33              if ax < alim:              if ax < alim:
34                  alpha = (ax / alim)**2                  alpha = (ax / alim)
35              else:              else:
36                  alpha = 1                  alpha = 1
37              str += "Color 1 0.3 0 %s\n" % (alpha)              str += "Color 1 0.3 0 %s\n" % (alpha)
# Line 60  class CScene: Line 60  class CScene:
60              AlphaFunc GREATER 0              AlphaFunc GREATER 0
61              BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA              BlendFunc SRC_ALPHA ONE_MINUS_SRC_ALPHA
62              Begin TRIANGLE_FAN              Begin TRIANGLE_FAN
63              Color 1 .3 0 .1              Color 1 .3 0 .3
64              Vertex .5 .5              Vertex .5 .5
65              Color 1 .3 0 0              Color 1 .3 0 0
66          """          """
# Line 78  class CScene: Line 78  class CScene:
78    
79          vs.map.put(getDListNocoords("Disable TEXTURE_2D"))          vs.map.put(getDListNocoords("Disable TEXTURE_2D"))
80    
81          w = 50          w = 25
82          cs2 = vs.coords.ortho(0, 0, 200-w, 215-w, 2*w, 2*w)          h = 50
83            cs2 = vs.coords.ortho(0, 0, 200-w, 215-h, 2*w, 2*h)
84          vs.map.put(s2, cs2)          vs.map.put(s2, cs2)
85                            
86          cs = vs.coords.ortho(0, 0, 200,200, 400, 30)          cs = vs.coords.ortho(0, 0, 200,200, 400, 30)

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

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