34 |
combiners = "Enable" |
combiners = "Enable" |
35 |
|
|
36 |
def __init__(self, x0, y0, x1, y1, border, ripple, |
def __init__(self, x0, y0, x1, y1, border, ripple, |
37 |
contentColor=java.awt.Color.white, |
typeInt=0, |
38 |
frameColor=java.awt.Color.black, |
contentColor=java.awt.Color.white, |
39 |
|
frameColor=java.awt.Color.black, |
40 |
type = "square"): |
type = "square"): |
41 |
|
|
42 |
|
if typeInt == 1: |
43 |
|
type = 'square' |
44 |
|
elif typeInt == 2: |
45 |
|
type = 'ellipse' |
46 |
|
|
47 |
|
|
48 |
print "Texture id:", self.tex.getTexId() |
print "Texture id:", self.tex.getTexId() |
49 |
|
|
50 |
def code(color): |
def code(color): |
96 |
|
|
97 |
def code2(color): |
def code2(color): |
98 |
return parseCombiner(""" |
return parseCombiner(""" |
99 |
PushAttrib ENABLE_BIT TEXTURE_BIT |
PushAttrib ENABLE_BIT TEXTURE_BIT COLOR_BUFFER_BIT |
100 |
CombinerParameterNV CONSTANT_COLOR0_NV %(color)s 1 |
CombinerParameterNV CONSTANT_COLOR0_NV %(color)s 1 |
101 |
|
|
102 |
Enable REGISTER_COMBINERS_NV |
Enable REGISTER_COMBINERS_NV |
148 |
SHIFTS8 = 256; |
SHIFTS8 = 256; |
149 |
|
|
150 |
self._content = GLRen.createIrregularEdge( |
self._content = GLRen.createIrregularEdge( |
151 |
0, texscale, 2.0, 128, 0, |
8, texscale, 2.0, 128, 0, |
152 |
-.5 * ripple_scale * texscale, |
-1 * ripple_scale * texscale, |
153 |
.5 * ripple_scale * texscale, |
0 * ripple_scale * texscale, |
154 |
0, "1 1 1 1 0 0 0 0", "", 3, 0, |
0, "1 1 1 1 0 0 0 0", "", 3, 0, |
155 |
SLICE_1D + Y_SECCOLOR + INSIDE, |
SLICE_1D + Y_SECCOLOR + INSIDE, |
156 |
code2(contentColor), |
code2(contentColor), |
157 |
1.0) |
1.0) |
158 |
|
|
159 |
self._frame = GLRen.createIrregularEdge( |
self._frame = GLRen.createIrregularEdge( |
160 |
0, texscale, 2.0, 128, 0, |
8, texscale, 2.0, 128, 0, |
161 |
-.5 * ripple_scale * texscale, |
-1 * ripple_scale * texscale, |
162 |
.5 * ripple_scale * texscale, |
0 * ripple_scale * texscale, |
163 |
0, "1 1 1 1 0 0 0 0", "", 3, 0, |
0, "1 1 1 1 0 0 0 0", "", 3, 0, |
164 |
SLICE_1D + Y_SECCOLOR + DOTVEC_COLOR + INTERP_DOTVEC, |
SLICE_1D + Y_SECCOLOR + DOTVEC_COLOR + INTERP_DOTVEC, |
165 |
code2(frameColor), |
code2(frameColor), |