Common Source Code Project for Qt (a.k.a for FM-7).
Revision | c1ee28e9aa76185778a9c5820f5f057d009b81af (tree) |
---|---|
Zeit | 2017-08-10 03:12:41 |
Autor | K.Ohta <whatisthis.sowhat@gmai...> |
Commiter | K.Ohta |
[Ui][Qt][OpenGL] OSD: Make icons transparent.
[Ui][Qt][OpenGL] OSD: Add support OpenGL 2.0.
@@ -227,7 +227,7 @@ void EmuThreadClass::get_tape_string() | ||
227 | 227 | tmpstr = QString::fromUtf8("<FONT COLOR=BLUE> EMPTY </FONT>"); |
228 | 228 | } |
229 | 229 | if(tmpstr != cmt_text[i]) { |
230 | - //emit sig_set_access_lamp(i + 12 + ((readwrite) ? 2 : 0), inserted); | |
230 | + emit sig_set_access_lamp(i + 12 + ((readwrite) ? 2 : 0), inserted); | |
231 | 231 | emit sig_change_osd(CSP_DockDisks_Domain_CMT, i, tmpstr); |
232 | 232 | cmt_text[i] = tmpstr; |
233 | 233 | } |
@@ -7,6 +7,7 @@ | ||
7 | 7 | <file alias="chromakey_fragment_shader2.glsl">../../gui/chromakey_fragment_shader2.glsl</file> |
8 | 8 | <file alias="led_fragment_shader.glsl">../../gui/led_fragment_shader.glsl</file> |
9 | 9 | <file alias="led_vertex_shader.glsl">../../gui/led_vertex_shader.glsl</file> |
10 | + <file alias="icon_fragment_shader.glsl">../../gui/icon_fragment_shader.glsl</file> | |
10 | 11 | <file alias="vertex_shader.glsl">../../gui/vertex_shader.glsl</file> |
11 | 12 | <file alias="grids_fragment_shader.glsl">../../gui/grids_fragment_shader.glsl</file> |
12 | 13 | <file alias="grids_vertex_shader.glsl">../../gui/grids_vertex_shader.glsl</file> |
@@ -0,0 +1,19 @@ | ||
1 | +varying vec2 v_texcoord; | |
2 | +uniform vec4 color; | |
3 | +uniform vec3 chromakey; | |
4 | +uniform bool do_chromakey; | |
5 | +uniform sampler2D a_texture; | |
6 | +void main () | |
7 | +{ | |
8 | + vec4 pixel_r_1; | |
9 | + vec4 pixel; | |
10 | + float alpha; | |
11 | + pixel_r_1 = texture2D(a_texture, v_texcoord); | |
12 | + //alpha = pixel_r_1.a * color.a; | |
13 | + | |
14 | + pixel_r_1 = pixel_r_1 * color; | |
15 | + pixel = pixel_r_1 * color; //;vec4(pixel_r_1.rgb, alpha); | |
16 | + gl_FragColor = pixel; | |
17 | + | |
18 | +} | |
19 | + |
@@ -90,7 +90,7 @@ void CSP_DrawItem::drawPolygonItem(QPointF _points[], int members, | ||
90 | 90 | } |
91 | 91 | |
92 | 92 | |
93 | -void CSP_DrawItem::drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text) | |
93 | +void CSP_DrawItem::drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &TextColor, float text_pt, QString text) | |
94 | 94 | { |
95 | 95 | double __width = (double)_width; |
96 | 96 | double __height = (double)_height; |
@@ -103,12 +103,12 @@ void CSP_DrawItem::drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &Tex | ||
103 | 103 | int ybase = (int)((__height - _nwidth) * 0.5); |
104 | 104 | int wbase = (int)_nwidth; |
105 | 105 | int hbase = wbase; |
106 | - drawRectItem(xbase, ybase, wbase, hbase, toned_brush_mid, FGColor, FGColor); | |
106 | + drawRectItem(xbase, ybase, wbase, hbase, fill_brush, FGColor, FGColor); | |
107 | 107 | { |
108 | 108 | int r = (int)((_nwidth * 0.35) / 2.0); |
109 | 109 | int x = xbase + wbase / 2 - r; |
110 | 110 | int y = ybase + hbase / 2 - r; |
111 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor); | |
111 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor2, FGColor2); | |
112 | 112 | } |
113 | 113 | { |
114 | 114 | int r = (int)((_nwidth * 0.15) / 2.0); |
@@ -121,7 +121,7 @@ void CSP_DrawItem::drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &Tex | ||
121 | 121 | double h = _nwidth * (1.0 - 0.35 - 0.2) / 2.0; |
122 | 122 | int x = (xbase + wbase / 2) - (int)(w / 2.0); |
123 | 123 | int y = (ybase + wbase / 2) + (int)(_nwidth * 0.45 / 2.0); |
124 | - drawRectItem(x, y, w, h, fill_brush, FGColor, FGColor); | |
124 | + drawRectItem(x, y, w, h, fill_brush, FGColor2, FGColor2); | |
125 | 125 | } |
126 | 126 | if(!text.isEmpty()) { |
127 | 127 | int x = xbase + (int)(_nwidth * 0.65); |
@@ -136,7 +136,7 @@ void CSP_DrawItem::drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &Tex | ||
136 | 136 | } |
137 | 137 | |
138 | 138 | |
139 | -void CSP_DrawItem::drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text) | |
139 | +void CSP_DrawItem::drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &FGColor3, QColor &TextColor, float text_pt, QString text) | |
140 | 140 | { |
141 | 141 | double __width = (double)_width; |
142 | 142 | double __height = (double)_height; |
@@ -159,7 +159,7 @@ void CSP_DrawItem::drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &T | ||
159 | 159 | QPointF((float)xbase + (float)_nwidth, (float)ybase + (float)_nheight), |
160 | 160 | QPointF((float)xbase, (float)ybase + (float)_nheight) |
161 | 161 | }; |
162 | - drawPolygonItem(points, 5, toned_brush_mid, FGColor, FGColor); | |
162 | + drawPolygonItem(points, 5, fill_brush, FGColor, FGColor); | |
163 | 163 | } |
164 | 164 | { |
165 | 165 | float xoffset = (float)(_nwidth * 0.25); |
@@ -172,7 +172,7 @@ void CSP_DrawItem::drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &T | ||
172 | 172 | QPointF((float)xbase + xoffset, (float)ybase + _h), |
173 | 173 | }; |
174 | 174 | drawPolygonItem(points, 4, fill_brush, BGColor, BGColor); |
175 | - drawPolygonItem(points, 4, toned_brush_light, FGColor, FGColor); | |
175 | + drawPolygonItem(points, 4, fill_brush, FGColor2, FGColor2); | |
176 | 176 | |
177 | 177 | { |
178 | 178 | xoffset = xoffset + _w * 0.65; |
@@ -185,11 +185,11 @@ void CSP_DrawItem::drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &T | ||
185 | 185 | QPointF((float)xbase + xoffset + _w2, (float)ybase + yoffset + _h2), |
186 | 186 | QPointF((float)xbase + xoffset, (float)ybase + yoffset + _h2), |
187 | 187 | }; |
188 | - drawPolygonItem(points2, 4, toned_brush_mid, FGColor, FGColor); | |
188 | + drawPolygonItem(points2, 4, fill_brush, FGColor3, FGColor3); | |
189 | 189 | } |
190 | 190 | } |
191 | 191 | if(!text.isEmpty()) { |
192 | - int x = xbase + + (int)(_nwidth * 0.23); | |
192 | + int x = xbase + + (int)(_nwidth * 0.65); | |
193 | 193 | int y = ybase + (int)(_nwidth * 0.55); |
194 | 194 | int w = (int)(_nwidth * 0.40); |
195 | 195 | int h = w; |
@@ -199,7 +199,7 @@ void CSP_DrawItem::drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &T | ||
199 | 199 | } |
200 | 200 | } |
201 | 201 | |
202 | -void CSP_DrawItem::drawCasetteTape(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text) | |
202 | +void CSP_DrawItem::drawCasetteTape(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &FGColor3, QColor &TextColor, float text_pt, QString text) | |
203 | 203 | { |
204 | 204 | double __width = (double)_width; |
205 | 205 | double __height = (double)_height; |
@@ -218,59 +218,59 @@ void CSP_DrawItem::drawCasetteTape(QColor &BGColor, QColor &FGColor, QColor &Tex | ||
218 | 218 | int y = ybase; |
219 | 219 | int w = wbase; |
220 | 220 | int h = hbase; |
221 | - drawRectItem(x, y, w, h, fill_brush, BGColor, FGColor); | |
221 | + drawRectItem(x, y, w, h, fill_brush, BGColor, BGColor); | |
222 | 222 | } |
223 | 223 | { |
224 | 224 | int r = (int)((_nwidth * 0.45) / 2.0); |
225 | 225 | int x = xbase + (int)(_nwidth * 0.25) - r; |
226 | 226 | int y = ybase + (int)(_nheight * 0.5) - r; |
227 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor); | |
227 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor, Qt::NoPen); | |
228 | 228 | } |
229 | 229 | { |
230 | 230 | int r = (int)((_nwidth * 0.10) / 2.0); |
231 | 231 | int x = xbase + (int)(_nwidth * 0.25) - r; |
232 | 232 | int y = ybase + (int)(_nheight * 0.5) - r; |
233 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, BGColor, BGColor); | |
233 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, BGColor, BGColor, Qt::NoPen); | |
234 | 234 | } |
235 | 235 | { |
236 | 236 | int r = (int)((_nwidth * 0.25) / 2.0); |
237 | 237 | int x = xbase + (int)(_nwidth * 0.75) - r; |
238 | 238 | int y = ybase + (int)(_nheight * 0.5) - r; |
239 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor); | |
239 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor, Qt::NoPen); | |
240 | 240 | } |
241 | 241 | { |
242 | 242 | int r = (int)((_nwidth * 0.10) / 2.0); |
243 | 243 | int x = xbase + (int)(_nwidth * 0.75) - r; |
244 | 244 | int y = ybase + (int)(_nheight * 0.5) - r; |
245 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, BGColor, BGColor); | |
245 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, BGColor, BGColor, Qt::NoPen); | |
246 | 246 | } |
247 | 247 | { |
248 | 248 | int x = xbase; |
249 | 249 | int y = ybase; |
250 | 250 | int w = wbase; |
251 | 251 | int h = (int)(_nheight * 0.35); |
252 | - drawRectItem(x, y, w, h, toned_brush_mid, FGColor, FGColor, Qt::NoPen); | |
252 | + drawRectItem(x, y, w, h, fill_brush, FGColor2, FGColor2, Qt::NoPen); | |
253 | 253 | } |
254 | 254 | { |
255 | 255 | int x = xbase; |
256 | 256 | int y = ybase + (int)(_nheight * 0.65); |
257 | 257 | int w = wbase; |
258 | 258 | int h = (int)(_nheight * 0.3); |
259 | - drawRectItem(x, y, w, h, toned_brush_mid, FGColor, FGColor, Qt::NoPen); | |
259 | + drawRectItem(x, y, w, h, fill_brush, FGColor2, FGColor2, Qt::NoPen); | |
260 | 260 | } |
261 | 261 | { |
262 | 262 | int x = xbase; |
263 | 263 | int y = ybase; |
264 | - int w = (int)(_nwidth * 0.2); | |
264 | + int w = (int)(_nwidth * 0.1); | |
265 | 265 | int h = hbase; |
266 | - drawRectItem(x, y, w, h, toned_brush_mid, FGColor, FGColor, Qt::NoPen); | |
266 | + drawRectItem(x, y, w, h, fill_brush, FGColor2, FGColor2, Qt::NoPen); | |
267 | 267 | } |
268 | 268 | { |
269 | - int w = (int)(_nwidth * 0.2); | |
269 | + int w = (int)(_nwidth * 0.1); | |
270 | 270 | int x = xbase + wbase - w; |
271 | 271 | int y = ybase; |
272 | 272 | int h = hbase; |
273 | - drawRectItem(x, y, w, h, toned_brush_mid, FGColor, FGColor, Qt::NoPen); | |
273 | + drawRectItem(x, y, w, h, fill_brush, FGColor2, FGColor2, Qt::NoPen); | |
274 | 274 | } |
275 | 275 | if(!text.isEmpty()) { |
276 | 276 | int x = 0 + (int)(__width * 0.7); |
@@ -284,7 +284,7 @@ void CSP_DrawItem::drawCasetteTape(QColor &BGColor, QColor &FGColor, QColor &Tex | ||
284 | 284 | } |
285 | 285 | } |
286 | 286 | |
287 | -void CSP_DrawItem::drawQuickDisk(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text) | |
287 | +void CSP_DrawItem::drawQuickDisk(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &TextColor, float text_pt, QString text) | |
288 | 288 | { |
289 | 289 | double __width = (double)_width; |
290 | 290 | double __height = (double)_height; |
@@ -297,7 +297,7 @@ void CSP_DrawItem::drawQuickDisk(QColor &BGColor, QColor &FGColor, QColor &TextC | ||
297 | 297 | int ybase = (int)((__height - _nwidth) * 0.5); |
298 | 298 | int wbase = (int)_nwidth; |
299 | 299 | int hbase = wbase; |
300 | - drawRectItem(xbase, ybase, wbase, hbase, toned_brush_mid, FGColor, FGColor); | |
300 | + drawRectItem(xbase, ybase, wbase, hbase, fill_brush, FGColor2, FGColor2); | |
301 | 301 | { |
302 | 302 | int r = (int)((_nwidth * 0.40) / 2.0); |
303 | 303 | int x = xbase + wbase / 2 - r; |
@@ -322,7 +322,7 @@ void CSP_DrawItem::drawQuickDisk(QColor &BGColor, QColor &FGColor, QColor &TextC | ||
322 | 322 | } |
323 | 323 | } |
324 | 324 | |
325 | -void CSP_DrawItem::drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &LabelColor, QColor &TextColor, float text_pt, QString text) | |
325 | +void CSP_DrawItem::drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &FGColor3, QColor &LabelColor, QColor &TextColor, float text_pt, QString text) | |
326 | 326 | { |
327 | 327 | double __width = (double)_width; |
328 | 328 | double __height = (double)_height; |
@@ -339,13 +339,13 @@ void CSP_DrawItem::drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &Lab | ||
339 | 339 | int r = (int)_nr; |
340 | 340 | int x = xbase - rbase; |
341 | 341 | int y = ybase - rbase; |
342 | - drawCircleItem(x, y, r, 0, 360 * 16, toned_brush_mid, FGColor, FGColor, Qt::NoPen); | |
342 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor2, FGColor2, Qt::NoPen); | |
343 | 343 | } |
344 | 344 | { |
345 | 345 | int r = (int)(_nr * 0.41 * 1.2); |
346 | 346 | int x = xbase - r; |
347 | 347 | int y = ybase - r; |
348 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor); | |
348 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor3, FGColor3); | |
349 | 349 | } |
350 | 350 | { |
351 | 351 | int r = (int)(_nr * 0.35 * 1.2); |
@@ -357,7 +357,7 @@ void CSP_DrawItem::drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &Lab | ||
357 | 357 | int r = (int)(_nr * 0.22 * 1.2); |
358 | 358 | int x = xbase - r; |
359 | 359 | int y = ybase - r; |
360 | - drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor); | |
360 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor2, FGColor2); | |
361 | 361 | } |
362 | 362 | { |
363 | 363 | int r = (int)(_nr * 0.15 * 1.2); |
@@ -388,7 +388,7 @@ void CSP_DrawItem::drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &Lab | ||
388 | 388 | } |
389 | 389 | } |
390 | 390 | |
391 | -void CSP_DrawItem::drawLaserDisc(QColor &BGColor, QColor &FGColor, QColor &LabelColor, QColor &TextColor, float text_pt, QString text) | |
391 | +void CSP_DrawItem::drawLaserDisc(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &LabelColor, QColor &TextColor, float text_pt, QString text) | |
392 | 392 | { |
393 | 393 | double __width = (double)_width; |
394 | 394 | double __height = (double)_height; |
@@ -405,13 +405,13 @@ void CSP_DrawItem::drawLaserDisc(QColor &BGColor, QColor &FGColor, QColor &Label | ||
405 | 405 | int r = (int)_nr; |
406 | 406 | int x = xbase - rbase; |
407 | 407 | int y = ybase - rbase; |
408 | - drawCircleItem(x, y, r, 0, 360 * 16, toned_brush_mid, FGColor, FGColor, Qt::NoPen); | |
408 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor2, FGColor2, Qt::NoPen); | |
409 | 409 | } |
410 | 410 | { |
411 | 411 | int r = (int)(_nr * 0.30 * 1.2); |
412 | 412 | int x = xbase - r; |
413 | 413 | int y = ybase - r; |
414 | - drawCircleItem(x, y, r, 0, 360 * 16, toned_brush_deep, FGColor, FGColor, Qt::NoPen); | |
414 | + drawCircleItem(x, y, r, 0, 360 * 16, fill_brush, FGColor, FGColor, Qt::NoPen); | |
415 | 415 | } |
416 | 416 | { |
417 | 417 | int r = (int)(_nr * 0.15 * 1.2); |
@@ -30,12 +30,12 @@ public: | ||
30 | 30 | CSP_DrawItem(int width, int height, Format fmt = QImage::Format_RGBA8888); |
31 | 31 | ~CSP_DrawItem(); |
32 | 32 | void clearCanvas(QColor &clColor); |
33 | - void drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text); | |
34 | - void drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text); | |
35 | - void drawCasetteTape(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text); | |
36 | - void drawQuickDisk(QColor &BGColor, QColor &FGColor, QColor &TextColor, float text_pt, QString text); | |
37 | - void drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &LabelColor, QColor &TextColor, float text_pt, QString text); | |
38 | - void drawLaserDisc(QColor &BGColor, QColor &FGColor, QColor &LabelColor, QColor &TextColor, float text_pt, QString text); | |
33 | + void drawFloppy5Inch(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &TextColor, float text_pt, QString text); | |
34 | + void drawFloppy3_5Inch(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &FGColor3, QColor &TextColor, float text_pt, QString text); | |
35 | + void drawCasetteTape(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &FGColor3, QColor &TextColor, float text_pt, QString text); | |
36 | + void drawQuickDisk(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &TextColor, float text_pt, QString text); | |
37 | + void drawCompactDisc(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &FGColor3, QColor &LabelColor, QColor &TextColor, float text_pt, QString text); | |
38 | + void drawLaserDisc(QColor &BGColor, QColor &FGColor, QColor &FGColor2, QColor &LabelColor, QColor &TextColor, float text_pt, QString text); | |
39 | 39 | }; |
40 | 40 | //QT_END_NAMESPACE |
41 | 41 | #endif /* _CSP_QT_DRAWITEM_H_ */ |
@@ -151,7 +151,7 @@ public slots: | ||
151 | 151 | void do_display_osd_leds(int lednum,bool onoff); |
152 | 152 | void do_set_led_width(int bitwidth); |
153 | 153 | void do_update_icon(int icon_type, int localnum, QPixmap *p); |
154 | - void do_update_icon(int icon_type, int localnum, QString message, QColor bg, QColor fg, QColor lg, QColor tg, float pt); | |
154 | + void do_update_icon(int icon_type, int localnum, QString message, QColor bg, QColor fg, QColor fg2, QColor fg3, QColor lg, QColor tg, float pt); | |
155 | 155 | |
156 | 156 | signals: |
157 | 157 | void update_screenChanged(int tick); |
@@ -49,7 +49,7 @@ void GLDrawClass::do_update_icon(int icon_type, int localnum, QPixmap *p) | ||
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | -void GLDrawClass::do_update_icon(int icon_type, int localnum, QString message, QColor bg, QColor fg, QColor lg, QColor tg, float pt) | |
52 | +void GLDrawClass::do_update_icon(int icon_type, int localnum, QString message, QColor bg, QColor fg, QColor fg2, QColor fg3, QColor lg, QColor tg, float pt) | |
53 | 53 | { |
54 | 54 | if(draw_item != NULL) { |
55 | 55 | QPixmap icon; |
@@ -59,23 +59,23 @@ void GLDrawClass::do_update_icon(int icon_type, int localnum, QString message, Q | ||
59 | 59 | draw_item->clearCanvas(nullColor); |
60 | 60 | break; |
61 | 61 | case 1: |
62 | - draw_item->drawFloppy5Inch(bg, fg, tg, pt, message); | |
62 | + draw_item->drawFloppy5Inch(bg, fg, fg2, tg, pt, message); | |
63 | 63 | break; |
64 | 64 | case 2: |
65 | - draw_item->drawFloppy3_5Inch(bg, fg, tg, pt, message); | |
65 | + draw_item->drawFloppy3_5Inch(bg, fg3, fg2, fg, tg, pt, message); | |
66 | 66 | break; |
67 | 67 | case 3: |
68 | - draw_item->drawQuickDisk(bg, fg, tg, pt, message); | |
68 | + draw_item->drawQuickDisk(bg, fg, fg2, tg, pt, message); | |
69 | 69 | break; |
70 | 70 | case 4: |
71 | 71 | case 5: |
72 | - draw_item->drawCasetteTape(bg, fg, tg, pt, message); | |
72 | + draw_item->drawCasetteTape(bg, fg, fg2, fg3, tg, pt, message); | |
73 | 73 | break; |
74 | 74 | case 6: |
75 | - draw_item->drawCompactDisc(bg, fg, lg, tg, pt, message); | |
75 | + draw_item->drawCompactDisc(bg, fg, fg2, fg3, lg, tg, pt, message); | |
76 | 76 | break; |
77 | 77 | case 7: |
78 | - draw_item->drawLaserDisc(bg, fg, lg, tg, pt, message); | |
78 | + draw_item->drawLaserDisc(bg, fg, fg2, lg, tg, pt, message); | |
79 | 79 | break; |
80 | 80 | default: |
81 | 81 | break; |
@@ -102,17 +102,20 @@ void GLDrawClass::initializeGL(void) | ||
102 | 102 | InitFBO(); // 拡張の有無を調べてからFBOを初期化する。 |
103 | 103 | InitGLExtensionVars(); |
104 | 104 | |
105 | - QColor BG = QColor(0, 250, 0, 196); | |
106 | - QColor TG = QColor(0, 0, 250, 196); | |
107 | - QColor LG = QColor(250, 0, 0, 196); | |
108 | - QColor FG = QColor(255, 255, 255, 196); | |
105 | + QColor BG = QColor(0, 250, 0, 255); | |
106 | + QColor TG = QColor(0, 0, 250, 255); | |
107 | + QColor TG2 = QColor(250, 250, 250, 255); | |
108 | + QColor LG = QColor(250, 0, 0, 255); | |
109 | + QColor FG = QColor(255, 255, 255, 255); | |
110 | + QColor FG2 = QColor(128, 128, 128, 255); | |
111 | + QColor FG3 = QColor(64, 64, 64, 255); | |
109 | 112 | |
110 | - do_update_icon(0, 0, QString::fromUtf8(""), BG, FG, LG, TG, 12.0f); | |
113 | + do_update_icon(0, 0, QString::fromUtf8(""), BG, FG, FG2, FG3, LG, TG, 12.0f); | |
111 | 114 | if(using_flags->is_use_laser_disc()) { |
112 | - do_update_icon(7, 0, QString::fromUtf8("LD"), BG, FG, LG, TG, 12.0f); | |
115 | + do_update_icon(7, 0, QString::fromUtf8("LD"), BG, FG, FG2, FG3, LG, TG, 12.0f); | |
113 | 116 | } |
114 | 117 | if(using_flags->is_use_compact_disc()) { |
115 | - do_update_icon(6, 0, QString::fromUtf8("CD"), BG, FG, LG, TG, 12.0f); | |
118 | + do_update_icon(6, 0, QString::fromUtf8("CD"), BG, FG, FG2, FG3, LG, TG, 12.0f); | |
116 | 119 | } |
117 | 120 | if(using_flags->is_use_fd()) { |
118 | 121 | int drvs = using_flags->get_max_drive(); |
@@ -121,7 +124,8 @@ void GLDrawClass::initializeGL(void) | ||
121 | 124 | tmps = QString::fromUtf8(""); |
122 | 125 | ts.setNum(i); |
123 | 126 | tmps = tmps + ts + QString::fromUtf8(":"); |
124 | - do_update_icon(1, i, tmps, BG, FG, LG, TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
127 | + do_update_icon(1, i, tmps, BG, FG, FG2, FG3, LG, TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
128 | + do_update_icon(2, i, tmps, BG, FG, FG2, FG3, LG, TG2, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
125 | 129 | } |
126 | 130 | } |
127 | 131 | if(using_flags->is_use_qd()) { |
@@ -131,22 +135,24 @@ void GLDrawClass::initializeGL(void) | ||
131 | 135 | tmps = QString::fromUtf8(""); |
132 | 136 | ts.setNum(i); |
133 | 137 | tmps = tmps + ts + QString::fromUtf8(":"); |
134 | - do_update_icon(3, i, tmps, BG, FG, LG, TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
138 | + do_update_icon(3, i, tmps, BG, FG, FG2, FG3, LG, TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
135 | 139 | } |
136 | 140 | } |
137 | 141 | if(using_flags->is_use_tape()) { |
138 | 142 | int drvs = using_flags->get_max_tape(); |
139 | - QColor R_BG = QColor(0, 0, 255, 192); | |
140 | - QColor W_BG = QColor(255, 0, 0, 192); | |
141 | - QColor C_FG = QColor(255, 255, 255, 192); | |
142 | - QColor C_TG = QColor(0, 255, 0, 255); | |
143 | + QColor R_BG = QColor(0, 0, 255, 255); | |
144 | + QColor W_BG = QColor(255, 0, 0, 255); | |
145 | + QColor C_FG = QColor(255, 255, 255, 255); | |
146 | + QColor C_FG2 = QColor(64, 64, 64, 255); | |
147 | + QColor C_FG3 = QColor(128, 128, 128, 255); | |
148 | + QColor C_TG = QColor(0, 255, 0, 255); | |
143 | 149 | QString ts, tmps; |
144 | 150 | for(int i = 0; i < drvs; i++) { |
145 | 151 | tmps = QString::fromUtf8(""); |
146 | 152 | ts.setNum(i + 1); |
147 | 153 | tmps = tmps + ts; |
148 | - do_update_icon(4, i, tmps, R_BG, C_FG, LG, C_TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
149 | - do_update_icon(5, i, tmps, W_BG, C_FG, LG, C_TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
154 | + do_update_icon(4, i, tmps, R_BG, C_FG, C_FG2, C_FG3, LG, C_TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
155 | + do_update_icon(5, i, tmps, W_BG, C_FG, C_FG2, C_FG3, LG, C_TG, 12.0f); // Dedicate to 3.5/5/8? and startnum. | |
150 | 156 | } |
151 | 157 | } |
152 | 158 | } |
@@ -88,8 +88,6 @@ GLDraw_2_0::GLDraw_2_0(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger, | ||
88 | 88 | for(int i = 0; i < 8; i++) { |
89 | 89 | for(int j = 0; j < 8; j++) { |
90 | 90 | icon_texid[i][j] = 0; |
91 | - icon_uploaded[i][j] = false; | |
92 | - icon_reqdraw[i][j] = false; | |
93 | 91 | } |
94 | 92 | } |
95 | 93 |
@@ -161,6 +159,70 @@ void GLDraw_2_0::do_set_display_osd(bool onoff) | ||
161 | 159 | osd_onoff = onoff; |
162 | 160 | } |
163 | 161 | |
162 | +void GLDraw_2_0::set_osd_vertex(int xbit) | |
163 | +{ | |
164 | + float xbase, ybase, zbase; | |
165 | + int major, minor, nl; | |
166 | + int i = xbit; | |
167 | + if((xbit < 0) || (xbit >= 32)) return; | |
168 | + if((i >= 2) && (i < 10)) { // FD | |
169 | + major = 0; | |
170 | + minor = i - 2; | |
171 | + nl = using_flags->get_max_drive(); | |
172 | + } else if((i >= 10) && (i < 12)) { // QD | |
173 | + major = 2; | |
174 | + minor = i - 10; | |
175 | + nl = using_flags->get_max_qd(); | |
176 | + } else if((i >= 12) && (i < 14)) { // CMT(R) | |
177 | + major = 1; | |
178 | + minor = i - 12; | |
179 | + nl = using_flags->get_max_tape(); | |
180 | + } else if((i >= 14) && (i < 16)) { // CMT(W) | |
181 | + major = 1; | |
182 | + minor = i - 14; | |
183 | + nl = using_flags->get_max_tape(); | |
184 | + } else if(i >= 16) { | |
185 | + major = 4 + (i / 8) - 2; | |
186 | + minor = i % 8; | |
187 | + nl = 8; | |
188 | + } else { | |
189 | + major = 6; | |
190 | + minor = i; | |
191 | + nl = 2; | |
192 | + } | |
193 | + xbase = 1.0f - (1.0f * 48.0f / 640.0f) * (float)(nl - minor) - (4.0f / 640.0f);; | |
194 | + ybase = -1.0f + (1.0f * 48.0f / 400.0f) * (float)(major + 1) + (4.0f / 400.0f); | |
195 | + zbase = -0.998f; | |
196 | + vertexOSD[i][0].x = xbase; | |
197 | + vertexOSD[i][0].y = ybase; | |
198 | + vertexOSD[i][0].z = zbase; | |
199 | + vertexOSD[i][0].s = 0.0f; | |
200 | + vertexOSD[i][0].t = 1.0f; | |
201 | + | |
202 | + vertexOSD[i][1].x = xbase + (48.0f / 640.0f); | |
203 | + vertexOSD[i][1].y = ybase; | |
204 | + vertexOSD[i][1].z = zbase; | |
205 | + vertexOSD[i][1].s = 1.0f; | |
206 | + vertexOSD[i][1].t = 1.0f; | |
207 | + | |
208 | + vertexOSD[i][2].x = xbase + (48.0f / 640.0f); | |
209 | + vertexOSD[i][2].y = ybase - (48.0f / 400.0f); | |
210 | + vertexOSD[i][2].z = zbase; | |
211 | + vertexOSD[i][2].s = 1.0f; | |
212 | + vertexOSD[i][2].t = 0.0f; | |
213 | + | |
214 | + vertexOSD[i][3].x = xbase; | |
215 | + vertexOSD[i][3].y = ybase - (48.0f / 400.0f); | |
216 | + vertexOSD[i][3].z = zbase; | |
217 | + vertexOSD[i][3].s = 0.0f; | |
218 | + vertexOSD[i][3].t = 0.0f; | |
219 | + | |
220 | + setNormalVAO(osd_shader, vertex_osd[xbit], | |
221 | + buffer_osd[xbit], | |
222 | + &(vertexOSD[i][0]), 4); | |
223 | +} | |
224 | + | |
225 | + | |
164 | 226 | void GLDraw_2_0::do_display_osd_leds(int lednum, bool onoff) |
165 | 227 | { |
166 | 228 | if(lednum == -1) { |
@@ -241,6 +303,74 @@ void GLDraw_2_0::drawOsdLeds() | ||
241 | 303 | } |
242 | 304 | } |
243 | 305 | |
306 | + | |
307 | +void GLDraw_2_0::drawOsdIcons() | |
308 | +{ | |
309 | + QVector4D color_on; | |
310 | + QVector4D color_off; | |
311 | + int major, minor; | |
312 | + if(osd_onoff) { | |
313 | + color_on = QVector4D(1.0, 1.0, 1.0, 0.8); | |
314 | + color_off = QVector4D(1.0, 1.0, 1.0, 0.00); | |
315 | + } else { | |
316 | + color_on = QVector4D(0.00,0.00, 0.00, 0.0); | |
317 | + color_off = QVector4D(0.00,0.00, 0.00, 0.0); | |
318 | + } | |
319 | + extfunc_2->glEnable(GL_BLEND); | |
320 | + extfunc_2->glEnable(GL_TEXTURE_2D); | |
321 | + extfunc_2->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | |
322 | + extfunc_2->glDisable(GL_DEPTH_TEST); | |
323 | + extfunc_2->glViewport(0, 0, p_wid->width(), p_wid->height()); | |
324 | + extfunc_2->glOrtho(-1.0f, 1.0f, -1.0f, 1.0f, -1.0, 1.0); | |
325 | + if(osd_onoff) { | |
326 | + uint32_t _bit = 0x00000001; | |
327 | + bool checkf; | |
328 | + for(int ii = 0; ii < osd_led_bit_width; ii++) { | |
329 | + checkf = ((_bit & osd_led_status) != 0); | |
330 | + if(checkf == ((_bit & osd_led_status_bak) != 0)) { | |
331 | + if(!checkf) { | |
332 | + _bit <<= 1; | |
333 | + continue; | |
334 | + } | |
335 | + } | |
336 | + if((ii >= 2) && (ii < 10)) { // FD | |
337 | + major = 2; | |
338 | + minor = ii - 2; | |
339 | + } else if((ii >= 10) && (ii < 12)) { // QD | |
340 | + major = 3; | |
341 | + minor = ii - 10; | |
342 | + } else if((ii >= 12) && (ii < 14)) { // CMT(R) | |
343 | + major = 4; | |
344 | + minor = ii - 12; | |
345 | + } else if((ii >= 14) && (ii < 16)) { // CMT(W) | |
346 | + major = 5; | |
347 | + minor = ii - 14; | |
348 | + } else if(ii >= 16) { | |
349 | + major = 4 + (ii / 8) - 2; | |
350 | + minor = ii % 8; | |
351 | + } else { | |
352 | + major = 6; | |
353 | + minor = ii; | |
354 | + } | |
355 | + if(checkf) { | |
356 | + drawMain(osd_shader, vertex_osd[ii], | |
357 | + buffer_osd[ii], | |
358 | + vertexOSD[ii], | |
359 | + icon_texid[major][minor], | |
360 | + color_on, false); | |
361 | + } else { | |
362 | + drawMain(osd_shader, vertex_osd[ii], | |
363 | + buffer_osd[ii], | |
364 | + vertexOSD[ii], | |
365 | + icon_texid[major][minor], | |
366 | + color_off, false); | |
367 | + } | |
368 | + _bit <<= 1; | |
369 | + } | |
370 | + osd_led_status_bak = osd_led_status; | |
371 | + } | |
372 | +} | |
373 | + | |
244 | 374 | void GLDraw_2_0::setNormalVAO(QOpenGLShaderProgram *prg, |
245 | 375 | QOpenGLVertexArrayObject *vp, |
246 | 376 | QOpenGLBuffer *bp, |
@@ -553,6 +683,42 @@ void GLDraw_2_0::initLocalGLObjects(void) | ||
553 | 683 | } |
554 | 684 | } |
555 | 685 | initBitmapVAO(); |
686 | + initOsdObjects(); | |
687 | +} | |
688 | + | |
689 | +void GLDraw_2_0::initOsdObjects(void) | |
690 | +{ | |
691 | + osd_shader = new QOpenGLShaderProgram(p_wid); | |
692 | + if(osd_shader != NULL) { | |
693 | + osd_shader->addShaderFromSourceFile(QOpenGLShader::Vertex, ":/vertex_shader.glsl"); | |
694 | + osd_shader->addShaderFromSourceFile(QOpenGLShader::Fragment, ":/icon_fragment_shader.glsl"); | |
695 | + osd_shader->link(); | |
696 | + } | |
697 | + for(int i = 0; i < 32; i++) { | |
698 | + buffer_osd[i] = new QOpenGLBuffer(QOpenGLBuffer::VertexBuffer); | |
699 | + vertex_osd[i] = new QOpenGLVertexArrayObject; | |
700 | + | |
701 | + if(buffer_osd[i] != NULL) { | |
702 | + if(buffer_osd[i]->create()) { | |
703 | + { | |
704 | + QVector4D c; | |
705 | + c = QVector4D(1.0, 1.0, 1.0, 1.0); | |
706 | + osd_shader->setUniformValue("color", c); | |
707 | + } | |
708 | + | |
709 | + //buffer_screen_vertex->create(); | |
710 | + buffer_osd[i]->setUsagePattern(QOpenGLBuffer::StaticDraw); | |
711 | + vertex_osd[i]->create(); | |
712 | + | |
713 | + if(vertex_osd[i] != NULL) vertex_osd[i]->bind(); | |
714 | + buffer_osd[i]->bind(); | |
715 | + buffer_osd[i]->allocate(sizeof(VertexTexCoord_t) * 4); | |
716 | + if(vertex_osd[i] != NULL) vertex_osd[i]->release(); | |
717 | + buffer_osd[i]->release(); | |
718 | + set_osd_vertex(i); | |
719 | + } | |
720 | + } | |
721 | + } | |
556 | 722 | } |
557 | 723 | |
558 | 724 | void GLDraw_2_0::doSetGridsHorizonal(int lines, bool force) |
@@ -888,25 +1054,15 @@ void GLDraw_2_0::uploadBitmapTexture(QImage *p) | ||
888 | 1054 | void GLDraw_2_0::uploadIconTexture(QPixmap *p, int icon_type, int localnum) |
889 | 1055 | { |
890 | 1056 | if((icon_type > 7) || (icon_type < 0)) return; |
891 | - if((localnum >= 8) || (localnum < 0)) return; | |
1057 | + if((localnum >= 9) || (localnum < 0)) return; | |
892 | 1058 | if(p == NULL) return; |
893 | 1059 | p_wid->makeCurrent(); |
894 | 1060 | QImage image = p->toImage(); |
895 | 1061 | GLuint texid = icon_texid[icon_type][localnum]; |
896 | 1062 | |
897 | - icon_uploaded[icon_type][localnum] = true; | |
898 | - if(texid == 0) { | |
899 | - icon_texid[icon_type][localnum] = p_wid->bindTexture(*p); | |
900 | - texid = icon_texid[icon_type][localnum]; | |
901 | - } | |
1063 | + if(texid != 0) p_wid->deleteTexture(texid); | |
902 | 1064 | { |
903 | - // Upload to main texture | |
904 | - extfunc_2->glBindTexture(GL_TEXTURE_2D, texid); | |
905 | - extfunc_2->glTexSubImage2D(GL_TEXTURE_2D, 0, | |
906 | - 0, 0, | |
907 | - image.width(), image.height(), | |
908 | - GL_BGRA, GL_UNSIGNED_BYTE, image.constBits()); | |
909 | - extfunc_2->glBindTexture(GL_TEXTURE_2D, 0); | |
1065 | + icon_texid[icon_type][localnum] = p_wid->bindTexture(*p); | |
910 | 1066 | } |
911 | 1067 | p_wid->doneCurrent(); |
912 | 1068 |
@@ -927,8 +1083,6 @@ void GLDraw_2_0::uploadMainTexture(QImage *p, bool use_chromakey) | ||
927 | 1083 | imgptr = p; |
928 | 1084 | if(p == NULL) return; |
929 | 1085 | { |
930 | - if(use_chromakey) { | |
931 | - } | |
932 | 1086 | // Upload to main texture |
933 | 1087 | if(uVramTextureID == 0) { |
934 | 1088 | uVramTextureID = p_wid->bindTexture(*p); |
@@ -1032,7 +1186,7 @@ void GLDraw_2_0::resizeGL(int width, int height) | ||
1032 | 1186 | void GLDraw_2_0::paintGL(void) |
1033 | 1187 | { |
1034 | 1188 | //p_wid->makeCurrent(); |
1035 | - if(crt_flag || redraw_required) { //return; | |
1189 | + //if(crt_flag || redraw_required) { //return; | |
1036 | 1190 | if(emu_launched) { |
1037 | 1191 | crt_flag = false; |
1038 | 1192 | } |
@@ -1057,12 +1211,14 @@ void GLDraw_2_0::paintGL(void) | ||
1057 | 1211 | if(!using_flags->is_use_one_board_computer() && (using_flags->get_max_button() <= 0)) { |
1058 | 1212 | drawGrids(); |
1059 | 1213 | } |
1060 | - drawOsdLeds(); | |
1214 | + //drawOsdLeds(); | |
1215 | + drawOsdIcons(); | |
1061 | 1216 | extfunc_2->glFlush(); |
1062 | - } else { | |
1063 | - drawOsdLeds(); | |
1064 | - extfunc_2->glFlush(); | |
1065 | - } | |
1217 | + //} else { | |
1218 | + //drawOsdLeds(); | |
1219 | + // drawOsdIcons(); | |
1220 | + // extfunc_2->glFlush(); | |
1221 | + //} | |
1066 | 1222 | //p_wid->doneCurrent(); |
1067 | 1223 | } |
1068 | 1224 |
@@ -60,9 +60,7 @@ protected: | ||
60 | 60 | int screen_texture_height; |
61 | 61 | int screen_texture_height_old; |
62 | 62 | |
63 | - bool icon_uploaded[8][8]; | |
64 | - bool icon_reqdraw[8][8]; | |
65 | - GLuint icon_texid[8][8]; | |
63 | + GLuint icon_texid[9][8]; | |
66 | 64 | |
67 | 65 | int rec_count; |
68 | 66 | int rec_width; |
@@ -82,6 +80,10 @@ protected: | ||
82 | 80 | QOpenGLVertexArrayObject *vertex_button[128]; |
83 | 81 | QOpenGLBuffer *buffer_button_vertex[128]; |
84 | 82 | QOpenGLShaderProgram *button_shader; |
83 | + VertexTexCoord_t vertexOSD[32][4]; | |
84 | + QOpenGLVertexArrayObject *vertex_osd[32]; | |
85 | + QOpenGLBuffer *buffer_osd[32]; | |
86 | + QOpenGLShaderProgram *osd_shader; | |
85 | 87 | |
86 | 88 | virtual void initButtons(void); |
87 | 89 | virtual void initBitmapVertex(void); |
@@ -126,6 +128,8 @@ protected: | ||
126 | 128 | bool redraw_required; |
127 | 129 | |
128 | 130 | virtual void drawOsdLeds(); |
131 | + virtual void drawOsdIcons(); | |
132 | + virtual void set_osd_vertex(int xbit); | |
129 | 133 | |
130 | 134 | QOpenGLFramebufferObject *offscreen_frame_buffer; |
131 | 135 | QOpenGLFramebufferObjectFormat *offscreen_frame_buffer_format; |
@@ -146,6 +150,8 @@ public: | ||
146 | 150 | virtual void initGLObjects(); |
147 | 151 | virtual void initFBO(void); |
148 | 152 | virtual void initLocalGLObjects(void); |
153 | + virtual void initOsdObjects(void); | |
154 | + | |
149 | 155 | virtual void uploadMainTexture(QImage *p, bool chromakey); |
150 | 156 | |
151 | 157 | virtual void drawScreenTexture(void); |
@@ -456,7 +456,7 @@ void GLDraw_3_0::initLocalGLObjects(void) | ||
456 | 456 | } |
457 | 457 | initPackedGLObject(&osd_pass, |
458 | 458 | 48.0, 48.0, |
459 | - ":/vertex_shader.glsl" , ":/chromakey_fragment_shader.glsl", | |
459 | + ":/vertex_shader.glsl" , ":/icon_fragment_shader.glsl", | |
460 | 460 | "OSD Shader"); |
461 | 461 | for(int i = 0; i < 32; i++) { |
462 | 462 | osd_pass_vao[i] = new QOpenGLVertexArrayObject; |
@@ -1130,8 +1130,8 @@ void GLDraw_3_0::drawOsdIcons() | ||
1130 | 1130 | QVector4D color_off; |
1131 | 1131 | uint32_t bit = 0x00000001; |
1132 | 1132 | if(osd_onoff) { |
1133 | - color_on = QVector4D(1.0, 1.0, 1.0, 0.3); | |
1134 | - color_off = QVector4D(1.0, 1.0, 1.0, 0.05); | |
1133 | + color_on = QVector4D(1.0, 1.0, 1.0, 0.8); | |
1134 | + color_off = QVector4D(1.0, 1.0, 1.0, 0.00); | |
1135 | 1135 | } else { |
1136 | 1136 | color_on = QVector4D(0.00,0.00, 0.00, 0.0); |
1137 | 1137 | color_off = QVector4D(0.00,0.00, 0.00, 0.0); |
@@ -1147,7 +1147,7 @@ void GLDraw_3_0::drawOsdIcons() | ||
1147 | 1147 | } |
1148 | 1148 | } |
1149 | 1149 | if((i >= 2) && (i < 10)) { // FD |
1150 | - major = 1; | |
1150 | + major = 2; | |
1151 | 1151 | minor = i - 2; |
1152 | 1152 | } else if((i >= 10) && (i < 12)) { // QD |
1153 | 1153 | major = 3; |
@@ -1459,27 +1459,6 @@ void GLDraw_3_0::do_set_texture_size(QImage *p, int w, int h) | ||
1459 | 1459 | } |
1460 | 1460 | } |
1461 | 1461 | |
1462 | -void GLDraw_3_0::uploadIconTexture(QPixmap *p, int icon_type, int localnum) | |
1463 | -{ | |
1464 | - if((icon_type > 7) || (icon_type < 0)) return; | |
1465 | - if((localnum >= 8) || (localnum < 0)) return; | |
1466 | - if(p == NULL) return; | |
1467 | - p_wid->makeCurrent(); | |
1468 | - | |
1469 | - QImage image = p->toImage(); | |
1470 | - GLuint texid = icon_texid[icon_type][localnum]; | |
1471 | - | |
1472 | - icon_uploaded[icon_type][localnum] = true; | |
1473 | - if(texid != 0) p_wid->deleteTexture(texid); | |
1474 | - { | |
1475 | - icon_texid[icon_type][localnum] = p_wid->bindTexture(image); | |
1476 | - } | |
1477 | - texid = icon_texid[icon_type][localnum]; | |
1478 | - printf("TYPE=%d LOCALNUM=%d TEXID=%d w=%d h=%d\n", icon_type, localnum, texid, image.width(), image.height()); | |
1479 | - p_wid->doneCurrent(); | |
1480 | - | |
1481 | -} | |
1482 | - | |
1483 | 1462 | void GLDraw_3_0::resizeGL_Screen(void) |
1484 | 1463 | { |
1485 | 1464 | if(main_pass != NULL) { |
@@ -116,6 +116,5 @@ public slots: | ||
116 | 116 | void do_set_texture_size(QImage *p, int w, int h); |
117 | 117 | virtual void paintGL(void); |
118 | 118 | virtual void resizeGL(int width, int height); |
119 | - virtual void uploadIconTexture(QPixmap *p, int icon_type, int localnum); | |
120 | 119 | }; |
121 | 120 | #endif |