1 |
|
|
2 |
/* |
/* |
3 |
OvalBgVob.java |
OvalBgVob.java |
4 |
* |
* |
53 |
if (!texLoaded) { |
if (!texLoaded) { |
54 |
String[] texparam = {"type", "8"}; |
String[] texparam = {"type", "8"}; |
55 |
tex = GL.createTexture(); |
tex = GL.createTexture(); |
56 |
/** !!! Should texture's size be relative to vob's physical size? |
/** XXX Should texture's size be relative to vob's physical size? |
57 |
* Then texture should be reloaded when greater needed. |
* If so, texture should be reloaded always when greater needed. |
58 |
|
* Currently texture is loaded only once. |
59 |
*/ |
*/ |
60 |
tex.shade(128, 128, 0, 1, "ALPHA", "ALPHA", "geometric", texparam); |
tex.shade(128, 128, 0, 1, "ALPHA", "ALPHA", "geometric", texparam); |
61 |
texLoaded = true; |
texLoaded = true; |
80 |
mw = rect.width, mh = rect.height; |
mw = rect.width, mh = rect.height; |
81 |
|
|
82 |
/** Origo and radius for circle. |
/** Origo and radius for circle. |
83 |
|
* Irrelevant, when using drawOval ad fillOval. |
84 |
Point co = new Point(mx+mw/2, my+h/2); |
Point co = new Point(mx+mw/2, my+h/2); |
85 |
int cr; |
int cr; |
86 |
if (mw < mh) cr = mw; |
if (mw < mh) cr = mw; |
159 |
"PushAttrib ENABLE_BIT\n"+ |
"PushAttrib ENABLE_BIT\n"+ |
160 |
"BindTexture TEXTURE_2D "+tex.getTexId()+"\n"+ |
"BindTexture TEXTURE_2D "+tex.getTexId()+"\n"+ |
161 |
"Enable TEXTURE_2D\n"+ |
"Enable TEXTURE_2D\n"+ |
162 |
|
|
163 |
|
/** Draws border. */ |
164 |
"Color 0 0 0 1\n" + |
"Color 0 0 0 1\n" + |
165 |
"Begin QUAD_STRIP\n"+ |
"Begin QUAD_STRIP\n"+ |
166 |
/** !!! Border width probably should NOT be |
/** XXX Border width probably should NOT be |
167 |
* relative to vob's size as below. |
* relative to vob's size as below. |
168 |
*/ |
*/ |
169 |
"TexCoord 1 1\nVertex 1.05 1.05\n"+ |
"TexCoord 1 1\nVertex 1.05 1.05\n"+ |
172 |
"TexCoord 0 0\nVertex -0.05 -0.05\n"+ |
"TexCoord 0 0\nVertex -0.05 -0.05\n"+ |
173 |
"End\n" + |
"End\n" + |
174 |
|
|
175 |
|
/** Draws filled oval using circular texture. */ |
176 |
bgcall + |
bgcall + |
177 |
|
|
178 |
"PopAttrib\n" |
"PopAttrib\n" |