19 |
self.x1, self.y1 = 600, 450 |
self.x1, self.y1 = 600, 450 |
20 |
|
|
21 |
def initirregu(self): |
def initirregu(self): |
22 |
w = 1 |
w = 2 |
23 |
|
|
24 |
self.white = getDListNocoords("Color 1 1 1") |
self.white = getDListNocoords("Color 1 1 1") |
25 |
self.black = getDListNocoords("Color 0 0 0") |
self.black = getDListNocoords("Color 0 0 0") |
28 |
# into [.25,75]^2 (center box of a 4x4 texture) |
# into [.25,75]^2 (center box of a 4x4 texture) |
29 |
iw = .25 / w |
iw = .25 / w |
30 |
self.mask = getDList(""" |
self.mask = getDList(""" |
31 |
ActiveTexture TEXTURE1 |
#ActiveTexture TEXTURE1 |
32 |
TexGen S TEXTURE_GEN_MODE EYE_LINEAR |
#TexGen S TEXTURE_GEN_MODE EYE_LINEAR |
33 |
TexGen S EYE_PLANE %(iw)s 0 0 .5 |
#TexGen S EYE_PLANE %(iw)s 0 0 .5 |
34 |
Enable TEXTURE_GEN_S |
#Enable TEXTURE_GEN_S |
35 |
TexGen T TEXTURE_GEN_MODE EYE_LINEAR |
#TexGen T TEXTURE_GEN_MODE EYE_LINEAR |
36 |
TexGen T EYE_PLANE 0 .25 0 .5 |
#TexGen T EYE_PLANE 0 .25 0 .5 |
37 |
Enable TEXTURE_GEN_T |
#Enable TEXTURE_GEN_T |
38 |
ActiveTexture TEXTURE0 |
#ActiveTexture TEXTURE0 |
39 |
Begin LINE_LOOP |
Begin LINE_LOOP |
40 |
Vertex -%(w)s -1 |
Vertex -%(w)s -1 |
41 |
Vertex -%(w)s +1 |
Vertex -%(w)s +1 |
55 |
TexImage2D TEXTURE_2D 0 ALPHA 4 4 0 ALPHA 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 |
TexImage2D TEXTURE_2D 0 ALPHA 4 4 0 ALPHA 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 |
56 |
TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 0 |
TexParameter TEXTURE_2D TEXTURE_BASE_LEVEL 0 |
57 |
TexParameter TEXTURE_2D TEXTURE_MAX_LEVEL 0 |
TexParameter TEXTURE_2D TEXTURE_MAX_LEVEL 0 |
58 |
#TexParameter TEXTURE_2D TEXTURE_WRAP_S CLAMP |
TexParameter TEXTURE_2D TEXTURE_WRAP_S CLAMP |
59 |
#TexParameter TEXTURE_2D TEXTURE_WRAP_T CLAMP |
TexParameter TEXTURE_2D TEXTURE_WRAP_T CLAMP |
60 |
TexParameter TEXTURE_2D TEXTURE_MIN_FILTER NEAREST |
TexParameter TEXTURE_2D TEXTURE_MIN_FILTER NEAREST |
61 |
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER NEAREST |
TexParameter TEXTURE_2D TEXTURE_MAG_FILTER NEAREST |
62 |
|
|
63 |
TexGen S TEXTURE_GEN_MODE OBJECT_LINEAR |
TexGen S TEXTURE_GEN_MODE EYE_LINEAR |
64 |
Enable TEXTURE_GEN_S |
Enable TEXTURE_GEN_S |
65 |
TexGen T TEXTURE_GEN_MODE OBJECT_LINEAR |
TexGen T TEXTURE_GEN_MODE EYE_LINEAR |
66 |
Enable TEXTURE_GEN_T |
Enable TEXTURE_GEN_T |
67 |
|
|
68 |
ActiveTexture TEXTURE0 |
ActiveTexture TEXTURE0 |
85 |
""" % (boxtex.getTexId(), tex.getTexId(), self.combiners) |
""" % (boxtex.getTexId(), tex.getTexId(), self.combiners) |
86 |
|
|
87 |
|
|
88 |
self.iq = GZZGL.createIrregularQuad(.2, 0, code) |
self.iq = GZZGL.createIrregularQuad(.2, w, 0, code) |
89 |
self.iq2 = GZZGL.createIrregularQuad(.2, 1, code) |
self.iq2 = GZZGL.createIrregularQuad(.2, w, 1, code) |
90 |
|
|
91 |
def key(self, k): |
def key(self, k): |
92 |
if 0: pass |
if 0: pass |
111 |
|
|
112 |
cs1 = vs.coords.affineCoordsys(0, "1", 10, self.x1, self.y1, 200, 0, 0, 100) |
cs1 = vs.coords.affineCoordsys(0, "1", 10, self.x1, self.y1, 200, 0, 0, 100) |
113 |
cs2 = vs.coords.affineCoordsys(0, "2", 10, 600, 450, 150, 32.3, -14.2, 150) |
cs2 = vs.coords.affineCoordsys(0, "2", 10, 600, 450, 150, 32.3, -14.2, 150) |
114 |
vs.map.put(self.mask, cs2) |
#vs.map.put(self.mask, cs2) |
115 |
|
|
116 |
if self.mode & 1: |
if self.mode & 1: |
117 |
putnoc(vs, self.black); |
putnoc(vs, self.black); |