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

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

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

revision 1.3 by jvk, Thu Oct 17 18:18:44 2002 UTC revision 1.4 by jvk, Fri Oct 18 10:53:35 2002 UTC
# Line 1  Line 1 
1    
2  tex = GL.createTexture()  tex = GL.createTexture()
3    
4  tex.shade(128, 128, 0, 4, "RGBA", "RGBA",  #tex.shade(128, 128, 0, 4, "RGBA", "RGBA",
5            "sawnoise", ["bias", ".5",  #          "sawnoise", ["bias", ".5",
6                         "scale", "0.15", "freq", "1", "df", "2",  #                       "scale", "0.15", "freq", "1", "df", "2",
7                         "scale2", "0.25", "freq2", "10", "df2", ".5"])  #                       "scale2", "0.25", "freq2", "10", "df2", ".5"])
8    
9  #tex.shade(16, 16, 0, 4, "RGBA", "RGBA",  #tex.shade(16, 16, 0, 4, "RGBA", "RGBA",
10  #          "geometric", ["type", "7", "bias", "-0", "scale", "2"])  #          "geometric", ["type", "7", "bias", "-0", "scale", "2"])
11    
12    
13    
14  e = 0.25  e = 0.5
15    
16  texid = tex.getTexId()  texid = tex.getTexId()
17    
# Line 24  irr = getDList(""" Line 24  irr = getDList("""
24    
25      BindTexture TEXTURE_2D %(texid)s      BindTexture TEXTURE_2D %(texid)s
26    
27        # Try to convince the GL implementation to do
28        # perspective correct color interpolation
29        Hint PERSPECTIVE_CORRECTION_HINT NICEST
30    
31      #Debug mountains      #Debug mountains
32      TexImage2D TEXTURE_2D 0 ALPHA 8 1 0 ALPHA .25 1 .25 .75 .25 .5 .25 .25      TexImage2D TEXTURE_2D 0 LUMINANCE_ALPHA 8 1 0 LUMINANCE_ALPHA \
33        .5 .5 1 1 .5 .5 .85 .85 .5 .5 .7 .7 .5 .5 .55 .55
34      TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 0      TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 0
35      TexParameter TEXTURE_2D TEXTURE_MAX_LEVEL 0      TexParameter TEXTURE_2D TEXTURE_MAX_LEVEL 0
36            
# Line 82  class IrreguScene: Line 87  class IrreguScene:
87          putnoc(vs, background((0.1,0.4,0.5)))          putnoc(vs, background((0.1,0.4,0.5)))
88    
89    
90          cs1 = vs.coords.affineCoordsys(0, 10, 200, 450, 800, 0, 0, -300)          cs1 = vs.coords.affineCoordsys(0, 0, 12, 700, 1000, 0, 0, -600)
91          vs.matcher.add(cs1, "1")          vs.matcher.add(cs1, "1")
92    
93          vs.map.put(irr, cs1)          vs.map.put(irr, cs1)

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

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