summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-12-01 21:11:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-01-07 15:06:03 +0900
commit2bd5cf6e6f22d909b76687dc90c3551317bc421e (patch)
tree1a8fbcbb50ec693a91825dfe1a6c64eba0214149 /src/modules
parent6552e8a6cc56c132ba396c03464ac0c9641593a3 (diff)
Evas masking: Use new texm sampler instead of texa
texa should be used only for RGB+A whereas texm should be used for masking. This should fix RGB+A masking, too.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h7
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_context.c438
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_shader.c3
-rw-r--r--src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x96
-rw-r--r--src/modules/evas/engines/gl_common/shader/font_mask_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/font_mask_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_bgra_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_bgra_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_nomul_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_nomul_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/img_mask_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/nv12_mask_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/nv12_mask_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/yuv_mask_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/yuv_mask_vert.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/yuy2_mask_frag.shd6
-rw-r--r--src/modules/evas/engines/gl_common/shader/yuy2_mask_vert.shd6
20 files changed, 342 insertions, 298 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index b201183f64..37873d24fe 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -270,6 +270,7 @@
270#define SHAD_TEXUV3 4 270#define SHAD_TEXUV3 4
271#define SHAD_TEXA 5 271#define SHAD_TEXA 5
272#define SHAD_TEXSAM 6 272#define SHAD_TEXSAM 6
273#define SHAD_TEXM 7
273 274
274typedef struct _Evas_GL_Program Evas_GL_Program; 275typedef struct _Evas_GL_Program Evas_GL_Program;
275typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source; 276typedef struct _Evas_GL_Program_Source Evas_GL_Program_Source;
@@ -419,7 +420,7 @@ struct _Evas_Engine_GL_Context
419 int top_pipe; 420 int top_pipe;
420 struct { 421 struct {
421 GLuint cur_prog; 422 GLuint cur_prog;
422 GLuint cur_tex, cur_texu, cur_texv, cur_texa; 423 GLuint cur_tex, cur_texu, cur_texv, cur_texa, cur_texm;
423 int render_op; 424 int render_op;
424 int cx, cy, cw, ch; 425 int cx, cy, cw, ch;
425 int smooth; 426 int smooth;
@@ -447,7 +448,7 @@ struct _Evas_Engine_GL_Context
447 struct { 448 struct {
448 Evas_GL_Image *surface; 449 Evas_GL_Image *surface;
449 GLuint cur_prog; 450 GLuint cur_prog;
450 GLuint cur_tex, cur_texu, cur_texv, cur_texa; 451 GLuint cur_tex, cur_texu, cur_texv, cur_texa, cur_texm;
451 void *cur_tex_dyn, *cur_texu_dyn, *cur_texv_dyn; 452 void *cur_tex_dyn, *cur_texu_dyn, *cur_texv_dyn;
452 int render_op; 453 int render_op;
453 int cx, cy, cw, ch; 454 int cx, cy, cw, ch;
@@ -464,6 +465,7 @@ struct _Evas_Engine_GL_Context
464 GLfloat *texuv3; 465 GLfloat *texuv3;
465 GLfloat *texa; 466 GLfloat *texa;
466 GLfloat *texsam; 467 GLfloat *texsam;
468 GLfloat *texm;
467 Eina_Bool line: 1; 469 Eina_Bool line: 1;
468 Eina_Bool use_vertex : 1; 470 Eina_Bool use_vertex : 1;
469 Eina_Bool use_color : 1; 471 Eina_Bool use_color : 1;
@@ -472,6 +474,7 @@ struct _Evas_Engine_GL_Context
472 Eina_Bool use_texuv3 : 1; 474 Eina_Bool use_texuv3 : 1;
473 Eina_Bool use_texa : 1; 475 Eina_Bool use_texa : 1;
474 Eina_Bool use_texsam : 1; 476 Eina_Bool use_texsam : 1;
477 Eina_Bool use_texm : 1;
475 Eina_Bool anti_alias : 1; 478 Eina_Bool anti_alias : 1;
476 Evas_GL_Image *im; 479 Evas_GL_Image *im;
477 GLuint buffer; 480 GLuint buffer;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 170581ff4f..54c26cf52b 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -830,12 +830,25 @@ evas_gl_common_context_new(void)
830 SHADER_TEXTURE_ADD(shared, YUV, texu); 830 SHADER_TEXTURE_ADD(shared, YUV, texu);
831 SHADER_TEXTURE_ADD(shared, YUV, texv); 831 SHADER_TEXTURE_ADD(shared, YUV, texv);
832 832
833 SHADER_TEXTURE_ADD(shared, YUV_MASK, tex);
834 SHADER_TEXTURE_ADD(shared, YUV_MASK, texu);
835 SHADER_TEXTURE_ADD(shared, YUV_MASK, texv);
836 SHADER_TEXTURE_ADD(shared, YUV_MASK, texm);
837
833 SHADER_TEXTURE_ADD(shared, YUY2, tex); 838 SHADER_TEXTURE_ADD(shared, YUY2, tex);
834 SHADER_TEXTURE_ADD(shared, YUY2, texuv); 839 SHADER_TEXTURE_ADD(shared, YUY2, texuv);
835 840
841 SHADER_TEXTURE_ADD(shared, YUY2_MASK, tex);
842 SHADER_TEXTURE_ADD(shared, YUY2_MASK, texuv);
843 SHADER_TEXTURE_ADD(shared, YUY2_MASK, texm);
844
836 SHADER_TEXTURE_ADD(shared, NV12, tex); 845 SHADER_TEXTURE_ADD(shared, NV12, tex);
837 SHADER_TEXTURE_ADD(shared, NV12, texuv); 846 SHADER_TEXTURE_ADD(shared, NV12, texuv);
838 847
848 SHADER_TEXTURE_ADD(shared, NV12_MASK, tex);
849 SHADER_TEXTURE_ADD(shared, NV12_MASK, texuv);
850 SHADER_TEXTURE_ADD(shared, NV12_MASK, texm);
851
839 SHADER_TEXTURE_ADD(shared, YUV_NOMUL, tex); 852 SHADER_TEXTURE_ADD(shared, YUV_NOMUL, tex);
840 SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texu); 853 SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texu);
841 SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texv); 854 SHADER_TEXTURE_ADD(shared, YUV_NOMUL, texv);
@@ -846,23 +859,29 @@ evas_gl_common_context_new(void)
846 SHADER_TEXTURE_ADD(shared, NV12_NOMUL, tex); 859 SHADER_TEXTURE_ADD(shared, NV12_NOMUL, tex);
847 SHADER_TEXTURE_ADD(shared, NV12_NOMUL, texuv); 860 SHADER_TEXTURE_ADD(shared, NV12_NOMUL, texuv);
848 861
862 // Note: there is no nomul version for YUV,YUY2,NV12,RGB+A with MASK
863
849 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR, tex); 864 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR, tex);
850 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR, texa); 865 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR, texa);
851 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_NOMUL, tex); 866 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_NOMUL, tex);
852 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_NOMUL, texa); 867 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_NOMUL, texa);
853 868
869 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_MASK, tex);
870 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_MASK, texa);
871 SHADER_TEXTURE_ADD(shared, RGB_A_PAIR_MASK, texm);
872
854 SHADER_TEXTURE_ADD(shared, IMG_MASK, tex); 873 SHADER_TEXTURE_ADD(shared, IMG_MASK, tex);
855 SHADER_TEXTURE_ADD(shared, IMG_MASK, texa); 874 SHADER_TEXTURE_ADD(shared, IMG_MASK, texm);
856 SHADER_TEXTURE_ADD(shared, IMG_MASK_NOMUL, tex); 875 SHADER_TEXTURE_ADD(shared, IMG_MASK_NOMUL, tex);
857 SHADER_TEXTURE_ADD(shared, IMG_MASK_NOMUL, texa); 876 SHADER_TEXTURE_ADD(shared, IMG_MASK_NOMUL, texm);
858 877
859 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA, tex); 878 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA, tex);
860 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA, texa); 879 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA, texm);
861 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA_NOMUL, tex); 880 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA_NOMUL, tex);
862 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA_NOMUL, texa); 881 SHADER_TEXTURE_ADD(shared, IMG_MASK_BGRA_NOMUL, texm);
863 882
864 SHADER_TEXTURE_ADD(shared, FONT_MASK, tex); 883 SHADER_TEXTURE_ADD(shared, FONT_MASK, tex);
865 SHADER_TEXTURE_ADD(shared, FONT_MASK, texa); 884 SHADER_TEXTURE_ADD(shared, FONT_MASK, texm);
866 885
867 if (gc->state.current.cur_prog == PRG_INVALID) 886 if (gc->state.current.cur_prog == PRG_INVALID)
868 glUseProgram(shared->shader[0].prog); 887 glUseProgram(shared->shader[0].prog);
@@ -923,6 +942,7 @@ evas_gl_common_context_free(Evas_Engine_GL_Context *gc)
923 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); 942 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
924 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); 943 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
925 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam); 944 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
945 if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm);
926 } 946 }
927 } 947 }
928 948
@@ -998,6 +1018,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
998 gc->state.current.cur_texu = 0; 1018 gc->state.current.cur_texu = 0;
999 gc->state.current.cur_texv = 0; 1019 gc->state.current.cur_texv = 0;
1000 gc->state.current.cur_texa = 0; 1020 gc->state.current.cur_texa = 0;
1021 gc->state.current.cur_texm = 0;
1001 gc->state.current.render_op = 0; 1022 gc->state.current.render_op = 0;
1002 gc->state.current.smooth = 0; 1023 gc->state.current.smooth = 0;
1003 gc->state.current.blend = 0; 1024 gc->state.current.blend = 0;
@@ -1025,6 +1046,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
1025 gc->pipe[i].shader.cur_texu = 0; 1046 gc->pipe[i].shader.cur_texu = 0;
1026 gc->pipe[i].shader.cur_texv = 0; 1047 gc->pipe[i].shader.cur_texv = 0;
1027 gc->pipe[i].shader.cur_texa = 0; 1048 gc->pipe[i].shader.cur_texa = 0;
1049 gc->pipe[i].shader.cur_texm = 0;
1028 gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND; 1050 gc->pipe[i].shader.render_op = EVAS_RENDER_BLEND;
1029 gc->pipe[i].shader.smooth = 0; 1051 gc->pipe[i].shader.smooth = 0;
1030 gc->pipe[i].shader.blend = 0; 1052 gc->pipe[i].shader.blend = 0;
@@ -1193,31 +1215,48 @@ evas_gl_common_context_target_surface_set(Evas_Engine_GL_Context *gc,
1193 _evas_gl_common_viewport_set(gc); 1215 _evas_gl_common_viewport_set(gc);
1194} 1216}
1195 1217
1196#define PUSH_VERTEX(n, x, y, z) \ 1218#define PUSH_VERTEX(n, x, y, z) do { \
1197 gc->pipe[n].array.vertex[nv++] = x; \ 1219 gc->pipe[n].array.vertex[nv++] = x; \
1198 gc->pipe[n].array.vertex[nv++] = y; \ 1220 gc->pipe[n].array.vertex[nv++] = y; \
1199 gc->pipe[n].array.vertex[nv++] = z 1221 gc->pipe[n].array.vertex[nv++] = z; } while(0)
1200#define PUSH_COLOR(n, r, g, b, a) \ 1222#define PUSH_COLOR(n, r, g, b, a) do { \
1201 gc->pipe[n].array.color[nc++] = r; \ 1223 gc->pipe[n].array.color[nc++] = r; \
1202 gc->pipe[n].array.color[nc++] = g; \ 1224 gc->pipe[n].array.color[nc++] = g; \
1203 gc->pipe[n].array.color[nc++] = b; \ 1225 gc->pipe[n].array.color[nc++] = b; \
1204 gc->pipe[n].array.color[nc++] = a 1226 gc->pipe[n].array.color[nc++] = a; } while(0)
1205#define PUSH_TEXUV(n, u, v) \ 1227#define PUSH_TEXUV(n, u, v) do { \
1206 gc->pipe[n].array.texuv[nu++] = u; \ 1228 gc->pipe[n].array.texuv[nu++] = u; \
1207 gc->pipe[n].array.texuv[nu++] = v 1229 gc->pipe[n].array.texuv[nu++] = v; } while(0)
1208#define PUSH_TEXUV2(n, u, v) \ 1230#define PUSH_TEXUV2(n, u, v) do { \
1209 gc->pipe[n].array.texuv2[nu2++] = u; \ 1231 gc->pipe[n].array.texuv2[nu2++] = u; \
1210 gc->pipe[n].array.texuv2[nu2++] = v 1232 gc->pipe[n].array.texuv2[nu2++] = v; } while(0)
1211#define PUSH_TEXUV3(n, u, v) \ 1233#define PUSH_TEXUV3(n, u, v) do { \
1212 gc->pipe[n].array.texuv3[nu3++] = u; \ 1234 gc->pipe[n].array.texuv3[nu3++] = u; \
1213 gc->pipe[n].array.texuv3[nu3++] = v 1235 gc->pipe[n].array.texuv3[nu3++] = v; } while(0)
1214#define PUSH_TEXA(n, u, v) \ 1236#define PUSH_TEXA(n, u, v) do { \
1215 gc->pipe[n].array.texa[na++] = u; \ 1237 gc->pipe[n].array.texa[na++] = u; \
1216 gc->pipe[n].array.texa[na++] = v 1238 gc->pipe[n].array.texa[na++] = v; } while(0)
1217#define PUSH_TEXSAM(n, x, y) \ 1239#define PUSH_TEXM(n, u, v) do { \
1240 gc->pipe[n].array.texm[nm++] = u; \
1241 gc->pipe[n].array.texm[nm++] = v; } while(0)
1242#define PUSH_TEXSAM(n, x, y) do { \
1218 gc->pipe[n].array.texsam[ns++] = x; \ 1243 gc->pipe[n].array.texsam[ns++] = x; \
1219 gc->pipe[n].array.texsam[ns++] = y 1244 gc->pipe[n].array.texsam[ns++] = y; } while(0)
1220 1245
1246#define PUSH_6_COLORS(pn, r, g, b, a) \
1247 do { int i; for (i = 0; i < 6; i++) PUSH_COLOR(pn, r, g, b, a); } while(0)
1248
1249#define PIPE_GROW(gc, pn, inc) \
1250 int nv = gc->pipe[pn].array.num * 3; (void) nv; \
1251 int nc = gc->pipe[pn].array.num * 4; (void) nc; \
1252 int nu = gc->pipe[pn].array.num * 2; (void) nu; \
1253 int nu2 = gc->pipe[pn].array.num * 2; (void) nu2; \
1254 int nu3 = gc->pipe[pn].array.num * 2; (void) nu3; \
1255 int na = gc->pipe[pn].array.num * 2; (void) na; \
1256 int ns = gc->pipe[pn].array.num * 2; (void) ns; \
1257 int nm = gc->pipe[pn].array.num * 2; (void) nm; \
1258 gc->pipe[pn].array.num += inc; \
1259 array_alloc(gc, pn);
1221 1260
1222static inline void 1261static inline void
1223array_alloc(Evas_Engine_GL_Context *gc, int n) 1262array_alloc(Evas_Engine_GL_Context *gc, int n)
@@ -1236,6 +1275,7 @@ array_alloc(Evas_Engine_GL_Context *gc, int n)
1236 ALOC(texuv2, GLfloat, 2); 1275 ALOC(texuv2, GLfloat, 2);
1237 ALOC(texuv3, GLfloat, 2); 1276 ALOC(texuv3, GLfloat, 2);
1238 ALOC(texsam, GLfloat, 2); 1277 ALOC(texsam, GLfloat, 2);
1278 ALOC(texm, GLfloat, 2);
1239 return; 1279 return;
1240 } 1280 }
1241 gc->pipe[n].array.alloc += 6 * 1024; 1281 gc->pipe[n].array.alloc += 6 * 1024;
@@ -1251,6 +1291,7 @@ array_alloc(Evas_Engine_GL_Context *gc, int n)
1251 RALOC(texuv2, GLfloat, 2); 1291 RALOC(texuv2, GLfloat, 2);
1252 RALOC(texuv3, GLfloat, 2); 1292 RALOC(texuv3, GLfloat, 2);
1253 RALOC(texsam, GLfloat, 2); 1293 RALOC(texsam, GLfloat, 2);
1294 RALOC(texm, GLfloat, 2);
1254} 1295}
1255 1296
1256#ifdef GLPIPES 1297#ifdef GLPIPES
@@ -1426,6 +1467,7 @@ _evas_gl_common_context_push(int rtype,
1426 if (!((gc->pipe[pn].region.type == rtype) 1467 if (!((gc->pipe[pn].region.type == rtype)
1427 && (!tex || gc->pipe[pn].shader.cur_tex == current_tex) 1468 && (!tex || gc->pipe[pn].shader.cur_tex == current_tex)
1428 && (!texa || gc->pipe[pn].shader.cur_texa == current_texa) 1469 && (!texa || gc->pipe[pn].shader.cur_texa == current_texa)
1470 && (!texm || gc->pipe[pn].shader.cur_texm == current_texm)
1429 && (gc->pipe[pn].shader.cur_prog == prog) 1471 && (gc->pipe[pn].shader.cur_prog == prog)
1430 && (gc->pipe[pn].shader.smooth == smooth) 1472 && (gc->pipe[pn].shader.smooth == smooth)
1431 && (gc->pipe[pn].shader.blend == blend) 1473 && (gc->pipe[pn].shader.blend == blend)
@@ -1457,10 +1499,9 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1457 int clip, int cx, int cy, int cw, int ch, 1499 int clip, int cx, int cy, int cw, int ch,
1458 int r, int g, int b, int a) 1500 int r, int g, int b, int a)
1459{ 1501{
1460 int pnum, nv, nc, i;
1461 Eina_Bool blend = EINA_FALSE; 1502 Eina_Bool blend = EINA_FALSE;
1462 GLuint prog = gc->shared->shader[SHADER_RECT].prog; 1503 GLuint prog = gc->shared->shader[SHADER_RECT].prog;
1463 int pn = 0; 1504 int pn = 0, i;
1464 1505
1465 if (!(gc->dc->render_op == EVAS_RENDER_COPY) && (a < 255)) 1506 if (!(gc->dc->render_op == EVAS_RENDER_COPY) && (a < 255))
1466 blend = EINA_TRUE; 1507 blend = EINA_TRUE;
@@ -1487,12 +1528,9 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1487 gc->pipe[pn].array.use_texuv3 = 0; 1528 gc->pipe[pn].array.use_texuv3 = 0;
1488 gc->pipe[pn].array.use_texa = 0; 1529 gc->pipe[pn].array.use_texa = 0;
1489 gc->pipe[pn].array.use_texsam = 0; 1530 gc->pipe[pn].array.use_texsam = 0;
1531 gc->pipe[pn].array.use_texm = 0;
1490 1532
1491 pnum = gc->pipe[pn].array.num; 1533 PIPE_GROW(gc, pn, 2);
1492 nv = pnum * 3; nc = pnum * 4;
1493 gc->pipe[pn].array.num += 2;
1494 array_alloc(gc, pn);
1495
1496 PUSH_VERTEX(pn, x1, y1, 0); 1534 PUSH_VERTEX(pn, x1, y1, 0);
1497 PUSH_VERTEX(pn, x2, y2, 0); 1535 PUSH_VERTEX(pn, x2, y2, 0);
1498 1536
@@ -1511,6 +1549,7 @@ evas_gl_common_context_line_push(Evas_Engine_GL_Context *gc,
1511 gc->pipe[pn].array.use_texuv3 = 0; 1549 gc->pipe[pn].array.use_texuv3 = 0;
1512 gc->pipe[pn].array.use_texa = 0; 1550 gc->pipe[pn].array.use_texa = 0;
1513 gc->pipe[pn].array.use_texsam = 0; 1551 gc->pipe[pn].array.use_texsam = 0;
1552 gc->pipe[pn].array.use_texm = 0;
1514} 1553}
1515 1554
1516void 1555void
@@ -1518,7 +1557,6 @@ evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
1518 int x, int y, int w, int h, 1557 int x, int y, int w, int h,
1519 int r, int g, int b, int a) 1558 int r, int g, int b, int a)
1520{ 1559{
1521 int pnum, nv, nc, i;
1522 Eina_Bool blend = EINA_FALSE; 1560 Eina_Bool blend = EINA_FALSE;
1523 GLuint prog = gc->shared->shader[SHADER_RECT].prog; 1561 GLuint prog = gc->shared->shader[SHADER_RECT].prog;
1524 int pn = 0; 1562 int pn = 0;
@@ -1550,10 +1588,11 @@ again:
1550 gc->pipe[pn].array.use_texuv3 = 0; 1588 gc->pipe[pn].array.use_texuv3 = 0;
1551 gc->pipe[pn].array.use_texa = 0; 1589 gc->pipe[pn].array.use_texa = 0;
1552 gc->pipe[pn].array.use_texsam = 0; 1590 gc->pipe[pn].array.use_texsam = 0;
1591 gc->pipe[pn].array.use_texm = 0;
1553 } 1592 }
1554 else 1593 else
1555 { 1594 {
1556 int found = 0; 1595 int found = 0, i;
1557 1596
1558 for (i = pn; i >= 0; i--) 1597 for (i = pn; i >= 0; i--)
1559 { 1598 {
@@ -1598,6 +1637,7 @@ again:
1598 gc->pipe[pn].array.use_texuv3 = 0; 1637 gc->pipe[pn].array.use_texuv3 = 0;
1599 gc->pipe[pn].array.use_texa = 0; 1638 gc->pipe[pn].array.use_texa = 0;
1600 gc->pipe[pn].array.use_texsam = 0; 1639 gc->pipe[pn].array.use_texsam = 0;
1640 gc->pipe[pn].array.use_texm = 0;
1601 } 1641 }
1602 } 1642 }
1603#else 1643#else
@@ -1630,14 +1670,11 @@ again:
1630 gc->pipe[pn].array.use_texuv3 = 0; 1670 gc->pipe[pn].array.use_texuv3 = 0;
1631 gc->pipe[pn].array.use_texa = 0; 1671 gc->pipe[pn].array.use_texa = 0;
1632 gc->pipe[pn].array.use_texsam = 0; 1672 gc->pipe[pn].array.use_texsam = 0;
1673 gc->pipe[pn].array.use_texm = 0;
1633#endif 1674#endif
1634 1675
1635 pipe_region_expand(gc, pn, x, y, w, h); 1676 pipe_region_expand(gc, pn, x, y, w, h);
1636 1677 PIPE_GROW(gc, pn, 6);
1637 pnum = gc->pipe[pn].array.num;
1638 nv = pnum * 3; nc = pnum * 4;
1639 gc->pipe[pn].array.num += 6;
1640 array_alloc(gc, pn);
1641 1678
1642 PUSH_VERTEX(pn, x , y , 0); 1679 PUSH_VERTEX(pn, x , y , 0);
1643 PUSH_VERTEX(pn, x + w, y , 0); 1680 PUSH_VERTEX(pn, x + w, y , 0);
@@ -1647,10 +1684,7 @@ again:
1647 PUSH_VERTEX(pn, x + w, y + h, 0); 1684 PUSH_VERTEX(pn, x + w, y + h, 0);
1648 PUSH_VERTEX(pn, x , y + h, 0); 1685 PUSH_VERTEX(pn, x , y + h, 0);
1649 1686
1650 for (i = 0; i < 6; i++) 1687 PUSH_6_COLORS(pn, r, g, b, a);
1651 {
1652 PUSH_COLOR(pn, r, g, b, a);
1653 }
1654} 1688}
1655 1689
1656void 1690void
@@ -1663,7 +1697,6 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1663 Eina_Bool smooth, Eina_Bool tex_only) 1697 Eina_Bool smooth, Eina_Bool tex_only)
1664{ 1698{
1665 Evas_GL_Texture_Pool *pt; 1699 Evas_GL_Texture_Pool *pt;
1666 int pnum, nv, nc, nu, ns, na, i;
1667 GLfloat tx1, tx2, ty1, ty2; 1700 GLfloat tx1, tx2, ty1, ty2;
1668 GLfloat offsetx, offsety; 1701 GLfloat offsetx, offsety;
1669 Eina_Bool blend = EINA_FALSE; 1702 Eina_Bool blend = EINA_FALSE;
@@ -1853,7 +1886,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1853 1886
1854 gc->pipe[pn].region.type = RTYPE_IMAGE; 1887 gc->pipe[pn].region.type = RTYPE_IMAGE;
1855 gc->pipe[pn].shader.cur_tex = pt->texture; 1888 gc->pipe[pn].shader.cur_tex = pt->texture;
1856 gc->pipe[pn].shader.cur_texa = mtex ? mtex->pt->texture : 0; 1889 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
1857 gc->pipe[pn].shader.cur_prog = prog; 1890 gc->pipe[pn].shader.cur_prog = prog;
1858 gc->pipe[pn].shader.smooth = smooth; 1891 gc->pipe[pn].shader.smooth = smooth;
1859 gc->pipe[pn].shader.blend = blend; 1892 gc->pipe[pn].shader.blend = blend;
@@ -1870,15 +1903,11 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1870 gc->pipe[pn].array.use_texuv = 1; 1903 gc->pipe[pn].array.use_texuv = 1;
1871 gc->pipe[pn].array.use_texuv2 = 0; 1904 gc->pipe[pn].array.use_texuv2 = 0;
1872 gc->pipe[pn].array.use_texuv3 = 0; 1905 gc->pipe[pn].array.use_texuv3 = 0;
1873 gc->pipe[pn].array.use_texa = !!mtex; 1906 gc->pipe[pn].array.use_texm = !!mtex;
1874 gc->pipe[pn].array.use_texsam = sam; 1907 gc->pipe[pn].array.use_texsam = sam;
1875 1908
1876 pipe_region_expand(gc, pn, x, y, w, h); 1909 pipe_region_expand(gc, pn, x, y, w, h);
1877 1910 PIPE_GROW(gc, pn, 6);
1878 pnum = gc->pipe[pn].array.num;
1879 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; ns = pnum * 2; na = pnum * 2;
1880 gc->pipe[pn].array.num += 6;
1881 array_alloc(gc, pn);
1882 1911
1883 if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) 1912 if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
1884 { 1913 {
@@ -1927,27 +1956,24 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
1927 1956
1928 if (mtex) 1957 if (mtex)
1929 { 1958 {
1930 GLfloat t2x1, t2x2, t2y1, t2y2; 1959 GLfloat tmx1, tmy1, tmx2, tmy2;
1931 1960
1932 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 1961 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
1933 t2y1 = (mtex->y + my) / (double)mtex->pt->h; 1962 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
1934 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w; 1963 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
1935 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h; 1964 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
1936 1965
1937 PUSH_TEXA(pn, t2x1, t2y1); 1966 PUSH_TEXM(pn, tmx1, tmy1);
1938 PUSH_TEXA(pn, t2x2, t2y1); 1967 PUSH_TEXM(pn, tmx2, tmy1);
1939 PUSH_TEXA(pn, t2x1, t2y2); 1968 PUSH_TEXM(pn, tmx1, tmy2);
1940 1969
1941 PUSH_TEXA(pn, t2x2, t2y1); 1970 PUSH_TEXM(pn, tmx2, tmy1);
1942 PUSH_TEXA(pn, t2x2, t2y2); 1971 PUSH_TEXM(pn, tmx2, tmy2);
1943 PUSH_TEXA(pn, t2x1, t2y2); 1972 PUSH_TEXM(pn, tmx1, tmy2);
1944 } 1973 }
1945 1974
1946 // if nomul... dont need this 1975 // if nomul... dont need this
1947 for (i = 0; i < 6; i++) 1976 PUSH_6_COLORS(pn, r, g, b, a);
1948 {
1949 PUSH_COLOR(pn, r, g, b, a);
1950 }
1951} 1977}
1952 1978
1953void 1979void
@@ -1958,7 +1984,6 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
1958 Evas_GL_Texture *mtex, int mx, int my, int mw, int mh, 1984 Evas_GL_Texture *mtex, int mx, int my, int mw, int mh,
1959 int r, int g, int b, int a) 1985 int r, int g, int b, int a)
1960{ 1986{
1961 int pnum, nv, nc, nu, na, i;
1962 GLfloat tx1, tx2, ty1, ty2; 1987 GLfloat tx1, tx2, ty1, ty2;
1963 GLuint prog; 1988 GLuint prog;
1964 int pn = 0; 1989 int pn = 0;
@@ -1978,7 +2003,7 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
1978 2003
1979 gc->pipe[pn].region.type = RTYPE_FONT; 2004 gc->pipe[pn].region.type = RTYPE_FONT;
1980 gc->pipe[pn].shader.cur_tex = tex->pt->texture; 2005 gc->pipe[pn].shader.cur_tex = tex->pt->texture;
1981 gc->pipe[pn].shader.cur_texa = mtex ? mtex->pt->texture : 0; 2006 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
1982 gc->pipe[pn].shader.cur_prog = prog; 2007 gc->pipe[pn].shader.cur_prog = prog;
1983 gc->pipe[pn].shader.smooth = 0; 2008 gc->pipe[pn].shader.smooth = 0;
1984 gc->pipe[pn].shader.blend = 1; 2009 gc->pipe[pn].shader.blend = 1;
@@ -1994,15 +2019,11 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
1994 gc->pipe[pn].array.use_texuv = 1; 2019 gc->pipe[pn].array.use_texuv = 1;
1995 gc->pipe[pn].array.use_texuv2 = 0; 2020 gc->pipe[pn].array.use_texuv2 = 0;
1996 gc->pipe[pn].array.use_texuv3 = 0; 2021 gc->pipe[pn].array.use_texuv3 = 0;
1997 gc->pipe[pn].array.use_texa = !!mtex; 2022 gc->pipe[pn].array.use_texm = !!mtex;
1998 gc->pipe[pn].array.use_texsam = 0; 2023 gc->pipe[pn].array.use_texsam = 0;
1999 2024
2000 pipe_region_expand(gc, pn, x, y, w, h); 2025 pipe_region_expand(gc, pn, x, y, w, h);
2001 2026 PIPE_GROW(gc, pn, 6);
2002 pnum = gc->pipe[pn].array.num;
2003 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; na = 2 * pnum;
2004 gc->pipe[pn].array.num += 6;
2005 array_alloc(gc, pn);
2006 2027
2007 if (sw == 0.0) 2028 if (sw == 0.0)
2008 { 2029 {
@@ -2037,26 +2058,23 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
2037 2058
2038 if (mtex) 2059 if (mtex)
2039 { 2060 {
2040 GLfloat t2x1, t2x2, t2y1, t2y2; 2061 GLfloat tmx1, tmy1, tmx2, tmy2;
2041 2062
2042 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 2063 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
2043 t2y1 = (mtex->y + my) / (double)mtex->pt->h; 2064 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
2044 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w; 2065 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2045 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h; 2066 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2046 2067
2047 PUSH_TEXA(pn, t2x1, t2y1); 2068 PUSH_TEXM(pn, tmx1, tmy1);
2048 PUSH_TEXA(pn, t2x2, t2y1); 2069 PUSH_TEXM(pn, tmx2, tmy1);
2049 PUSH_TEXA(pn, t2x1, t2y2); 2070 PUSH_TEXM(pn, tmx1, tmy2);
2050 2071
2051 PUSH_TEXA(pn, t2x2, t2y1); 2072 PUSH_TEXM(pn, tmx2, tmy1);
2052 PUSH_TEXA(pn, t2x2, t2y2); 2073 PUSH_TEXM(pn, tmx2, tmy2);
2053 PUSH_TEXA(pn, t2x1, t2y2); 2074 PUSH_TEXM(pn, tmx1, tmy2);
2054 } 2075 }
2055 2076
2056 for (i = 0; i < 6; i++) 2077 PUSH_6_COLORS(pn, r, g, b, a);
2057 {
2058 PUSH_COLOR(pn, r, g, b, a);
2059 }
2060} 2078}
2061 2079
2062void 2080void
@@ -2068,7 +2086,6 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
2068 int r, int g, int b, int a, 2086 int r, int g, int b, int a,
2069 Eina_Bool smooth) 2087 Eina_Bool smooth)
2070{ 2088{
2071 int pnum, nv, nc, nu, nu2, nu3, na, i;
2072 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; 2089 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
2073 Eina_Bool blend = 0; 2090 Eina_Bool blend = 0;
2074 GLuint prog; 2091 GLuint prog;
@@ -2092,7 +2109,7 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
2092 gc->pipe[pn].shader.cur_tex = tex->pt->texture; 2109 gc->pipe[pn].shader.cur_tex = tex->pt->texture;
2093 gc->pipe[pn].shader.cur_texu = tex->ptu->texture; 2110 gc->pipe[pn].shader.cur_texu = tex->ptu->texture;
2094 gc->pipe[pn].shader.cur_texv = tex->ptv->texture; 2111 gc->pipe[pn].shader.cur_texv = tex->ptv->texture;
2095 gc->pipe[pn].shader.cur_texa = mtex ? mtex->pt->texture : 0; 2112 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
2096 gc->pipe[pn].shader.cur_prog = prog; 2113 gc->pipe[pn].shader.cur_prog = prog;
2097 gc->pipe[pn].shader.smooth = smooth; 2114 gc->pipe[pn].shader.smooth = smooth;
2098 gc->pipe[pn].shader.blend = blend; 2115 gc->pipe[pn].shader.blend = blend;
@@ -2108,16 +2125,11 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
2108 gc->pipe[pn].array.use_texuv = 1; 2125 gc->pipe[pn].array.use_texuv = 1;
2109 gc->pipe[pn].array.use_texuv2 = 1; 2126 gc->pipe[pn].array.use_texuv2 = 1;
2110 gc->pipe[pn].array.use_texuv3 = 1; 2127 gc->pipe[pn].array.use_texuv3 = 1;
2111 gc->pipe[pn].array.use_texa = !!mtex; 2128 gc->pipe[pn].array.use_texm = !!mtex;
2112 gc->pipe[pn].array.use_texsam = 0; 2129 gc->pipe[pn].array.use_texsam = 0;
2113 2130
2114 pipe_region_expand(gc, pn, x, y, w, h); 2131 pipe_region_expand(gc, pn, x, y, w, h);
2115 2132 PIPE_GROW(gc, pn, 6);
2116 pnum = gc->pipe[pn].array.num;
2117 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; na = pnum * 2;
2118 nu2 = pnum * 2; nu3 = pnum * 2;
2119 gc->pipe[pn].array.num += 6;
2120 array_alloc(gc, pn);
2121 2133
2122 tx1 = (sx) / (double)tex->pt->w; 2134 tx1 = (sx) / (double)tex->pt->w;
2123 ty1 = (sy) / (double)tex->pt->h; 2135 ty1 = (sy) / (double)tex->pt->h;
@@ -2163,24 +2175,23 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
2163 2175
2164 if (mtex) 2176 if (mtex)
2165 { 2177 {
2166 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 2178 GLfloat tmx1, tmy1, tmx2, tmy2;
2167 t2y1 = (mtex->y + my) / (double)mtex->pt->h;
2168 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2169 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2170 2179
2171 PUSH_TEXA(pn, t2x1, t2y1); 2180 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
2172 PUSH_TEXA(pn, t2x2, t2y1); 2181 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
2173 PUSH_TEXA(pn, t2x1, t2y2); 2182 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2183 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2174 2184
2175 PUSH_TEXA(pn, t2x2, t2y1); 2185 PUSH_TEXM(pn, tmx1, tmy1);
2176 PUSH_TEXA(pn, t2x2, t2y2); 2186 PUSH_TEXM(pn, tmx2, tmy1);
2177 PUSH_TEXA(pn, t2x1, t2y2); 2187 PUSH_TEXM(pn, tmx1, tmy2);
2178 }
2179 2188
2180 for (i = 0; i < 6; i++) 2189 PUSH_TEXM(pn, tmx2, tmy1);
2181 { 2190 PUSH_TEXM(pn, tmx2, tmy2);
2182 PUSH_COLOR(pn, r, g, b, a); 2191 PUSH_TEXM(pn, tmx1, tmy2);
2183 } 2192 }
2193
2194 PUSH_6_COLORS(pn, r, g, b, a);
2184} 2195}
2185 2196
2186void 2197void
@@ -2192,7 +2203,6 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
2192 int r, int g, int b, int a, 2203 int r, int g, int b, int a,
2193 Eina_Bool smooth) 2204 Eina_Bool smooth)
2194{ 2205{
2195 int pnum, nv, nc, nu, nu2, na, i;
2196 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; 2206 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
2197 Eina_Bool blend = 0; 2207 Eina_Bool blend = 0;
2198 GLuint prog; 2208 GLuint prog;
@@ -2215,7 +2225,7 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
2215 gc->pipe[pn].region.type = RTYPE_YUY2; 2225 gc->pipe[pn].region.type = RTYPE_YUY2;
2216 gc->pipe[pn].shader.cur_tex = tex->pt->texture; 2226 gc->pipe[pn].shader.cur_tex = tex->pt->texture;
2217 gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; 2227 gc->pipe[pn].shader.cur_texu = tex->ptuv->texture;
2218 gc->pipe[pn].shader.cur_texa = mtex ? mtex->pt->texture : 0; 2228 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
2219 gc->pipe[pn].shader.cur_prog = prog; 2229 gc->pipe[pn].shader.cur_prog = prog;
2220 gc->pipe[pn].shader.smooth = smooth; 2230 gc->pipe[pn].shader.smooth = smooth;
2221 gc->pipe[pn].shader.blend = blend; 2231 gc->pipe[pn].shader.blend = blend;
@@ -2231,16 +2241,11 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
2231 gc->pipe[pn].array.use_texuv = 1; 2241 gc->pipe[pn].array.use_texuv = 1;
2232 gc->pipe[pn].array.use_texuv2 = 1; 2242 gc->pipe[pn].array.use_texuv2 = 1;
2233 gc->pipe[pn].array.use_texuv3 = 0; 2243 gc->pipe[pn].array.use_texuv3 = 0;
2234 gc->pipe[pn].array.use_texa = !!mtex; 2244 gc->pipe[pn].array.use_texm = !!mtex;
2235 gc->pipe[pn].array.use_texsam = 0; 2245 gc->pipe[pn].array.use_texsam = 0;
2236 2246
2237 pipe_region_expand(gc, pn, x, y, w, h); 2247 pipe_region_expand(gc, pn, x, y, w, h);
2238 2248 PIPE_GROW(gc, pn, 6);
2239 pnum = gc->pipe[pn].array.num;
2240 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; na = pnum * 2;
2241 nu2 = pnum * 2;
2242 gc->pipe[pn].array.num += 6;
2243 array_alloc(gc, pn);
2244 2249
2245 tx1 = (sx) / (double)tex->pt->w; 2250 tx1 = (sx) / (double)tex->pt->w;
2246 ty1 = (sy) / (double)tex->pt->h; 2251 ty1 = (sy) / (double)tex->pt->h;
@@ -2278,24 +2283,23 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
2278 2283
2279 if (mtex) 2284 if (mtex)
2280 { 2285 {
2281 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 2286 GLfloat tmx1, tmy1, tmx2, tmy2;
2282 t2y1 = (mtex->y + my) / (double)mtex->pt->h;
2283 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2284 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2285 2287
2286 PUSH_TEXA(pn, t2x1, t2y1); 2288 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
2287 PUSH_TEXA(pn, t2x2, t2y1); 2289 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
2288 PUSH_TEXA(pn, t2x1, t2y2); 2290 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2291 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2289 2292
2290 PUSH_TEXA(pn, t2x2, t2y1); 2293 PUSH_TEXM(pn, tmx1, tmy1);
2291 PUSH_TEXA(pn, t2x2, t2y2); 2294 PUSH_TEXM(pn, tmx2, tmy1);
2292 PUSH_TEXA(pn, t2x1, t2y2); 2295 PUSH_TEXM(pn, tmx1, tmy2);
2293 }
2294 2296
2295 for (i = 0; i < 6; i++) 2297 PUSH_TEXM(pn, tmx2, tmy1);
2296 { 2298 PUSH_TEXM(pn, tmx2, tmy2);
2297 PUSH_COLOR(pn, r, g, b, a); 2299 PUSH_TEXM(pn, tmx1, tmy2);
2298 } 2300 }
2301
2302 PUSH_6_COLORS(pn, r, g, b, a);
2299} 2303}
2300 2304
2301void 2305void
@@ -2307,7 +2311,6 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
2307 int r, int g, int b, int a, 2311 int r, int g, int b, int a,
2308 Eina_Bool smooth) 2312 Eina_Bool smooth)
2309{ 2313{
2310 int pnum, nv, nc, nu, nu2, na, i;
2311 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; 2314 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
2312 Eina_Bool blend = 0; 2315 Eina_Bool blend = 0;
2313 GLuint prog; 2316 GLuint prog;
@@ -2332,7 +2335,7 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
2332 gc->pipe[pn].shader.cur_tex_dyn = tex->pt->dyn.img; 2335 gc->pipe[pn].shader.cur_tex_dyn = tex->pt->dyn.img;
2333 gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; 2336 gc->pipe[pn].shader.cur_texu = tex->ptuv->texture;
2334 gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img; 2337 gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img;
2335 gc->pipe[pn].shader.cur_texa = mtex ? mtex->pt->texture : 0; 2338 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
2336 gc->pipe[pn].shader.cur_prog = prog; 2339 gc->pipe[pn].shader.cur_prog = prog;
2337 gc->pipe[pn].shader.smooth = smooth; 2340 gc->pipe[pn].shader.smooth = smooth;
2338 gc->pipe[pn].shader.blend = blend; 2341 gc->pipe[pn].shader.blend = blend;
@@ -2348,16 +2351,11 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
2348 gc->pipe[pn].array.use_texuv = 1; 2351 gc->pipe[pn].array.use_texuv = 1;
2349 gc->pipe[pn].array.use_texuv2 = 1; 2352 gc->pipe[pn].array.use_texuv2 = 1;
2350 gc->pipe[pn].array.use_texuv3 = 0; 2353 gc->pipe[pn].array.use_texuv3 = 0;
2351 gc->pipe[pn].array.use_texa = !!mtex; 2354 gc->pipe[pn].array.use_texm = !!mtex;
2352 gc->pipe[pn].array.use_texsam = 0; 2355 gc->pipe[pn].array.use_texsam = 0;
2353 2356
2354 pipe_region_expand(gc, pn, x, y, w, h); 2357 pipe_region_expand(gc, pn, x, y, w, h);
2355 2358 PIPE_GROW(gc, pn, 6);
2356 pnum = gc->pipe[pn].array.num;
2357 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; na = pnum * 2;
2358 nu2 = pnum * 2;
2359 gc->pipe[pn].array.num += 6;
2360 array_alloc(gc, pn);
2361 2359
2362 tx1 = (sx) / (double)tex->pt->w; 2360 tx1 = (sx) / (double)tex->pt->w;
2363 ty1 = (sy) / (double)tex->pt->h; 2361 ty1 = (sy) / (double)tex->pt->h;
@@ -2395,24 +2393,23 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
2395 2393
2396 if (mtex) 2394 if (mtex)
2397 { 2395 {
2398 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 2396 GLfloat tmx1, tmy1, tmx2, tmy2;
2399 t2y1 = (mtex->y + my) / (double)mtex->pt->h;
2400 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2401 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2402 2397
2403 PUSH_TEXA(pn, t2x1, t2y1); 2398 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
2404 PUSH_TEXA(pn, t2x2, t2y1); 2399 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
2405 PUSH_TEXA(pn, t2x1, t2y2); 2400 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2401 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2406 2402
2407 PUSH_TEXA(pn, t2x2, t2y1); 2403 PUSH_TEXM(pn, tmx1, tmy1);
2408 PUSH_TEXA(pn, t2x2, t2y2); 2404 PUSH_TEXM(pn, tmx2, tmy1);
2409 PUSH_TEXA(pn, t2x1, t2y2); 2405 PUSH_TEXM(pn, tmx1, tmy2);
2410 }
2411 2406
2412 for (i = 0; i < 6; i++) 2407 PUSH_TEXM(pn, tmx2, tmy1);
2413 { 2408 PUSH_TEXM(pn, tmx2, tmy2);
2414 PUSH_COLOR(pn, r, g, b, a); 2409 PUSH_TEXM(pn, tmx1, tmy2);
2415 } 2410 }
2411
2412 PUSH_6_COLORS(pn, r, g, b, a);
2416} 2413}
2417 2414
2418void 2415void
@@ -2433,7 +2430,6 @@ evas_gl_common_context_rgb_a_pair_push(Evas_Engine_GL_Context *gc,
2433 * colorspaces as well (eg. RGB565+Alpha4, ...). 2430 * colorspaces as well (eg. RGB565+Alpha4, ...).
2434 */ 2431 */
2435 2432
2436 int pnum, nv, nc, nu, na, i;
2437 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2; 2433 GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
2438 GLuint prog; 2434 GLuint prog;
2439 int pn; 2435 int pn;
@@ -2454,8 +2450,7 @@ evas_gl_common_context_rgb_a_pair_push(Evas_Engine_GL_Context *gc,
2454 gc->pipe[pn].region.type = RTYPE_IMAGE; 2450 gc->pipe[pn].region.type = RTYPE_IMAGE;
2455 gc->pipe[pn].shader.cur_tex = tex->pt->texture; 2451 gc->pipe[pn].shader.cur_tex = tex->pt->texture;
2456 gc->pipe[pn].shader.cur_texa = tex->pta->texture; 2452 gc->pipe[pn].shader.cur_texa = tex->pta->texture;
2457#warning FIXME: must add texm instead 2453 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
2458 //gc->pipe[pn].shader.cur_texu = mtex ? mtex->pt->texture : 0;
2459 gc->pipe[pn].shader.cur_prog = prog; 2454 gc->pipe[pn].shader.cur_prog = prog;
2460 gc->pipe[pn].shader.smooth = smooth; 2455 gc->pipe[pn].shader.smooth = smooth;
2461 gc->pipe[pn].shader.blend = EINA_TRUE; 2456 gc->pipe[pn].shader.blend = EINA_TRUE;
@@ -2474,13 +2469,10 @@ evas_gl_common_context_rgb_a_pair_push(Evas_Engine_GL_Context *gc,
2474 gc->pipe[pn].array.use_texuv3 = 0; 2469 gc->pipe[pn].array.use_texuv3 = 0;
2475 gc->pipe[pn].array.use_texa = EINA_TRUE; 2470 gc->pipe[pn].array.use_texa = EINA_TRUE;
2476 gc->pipe[pn].array.use_texsam = 0; 2471 gc->pipe[pn].array.use_texsam = 0;
2472 gc->pipe[pn].array.use_texm = !!mtex;
2477 2473
2478 pipe_region_expand(gc, pn, x, y, w, h); 2474 pipe_region_expand(gc, pn, x, y, w, h);
2479 2475 PIPE_GROW(gc, pn, 6);
2480 pnum = gc->pipe[pn].array.num;
2481 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; na = pnum * 2;
2482 gc->pipe[pn].array.num += 6;
2483 array_alloc(gc, pn);
2484 2476
2485 // FIXME: pt and pta could have different x,y 2477 // FIXME: pt and pta could have different x,y
2486 tx1 = (tex->x + sx) / (double)tex->pt->w; 2478 tx1 = (tex->x + sx) / (double)tex->pt->w;
@@ -2517,28 +2509,25 @@ evas_gl_common_context_rgb_a_pair_push(Evas_Engine_GL_Context *gc,
2517 PUSH_TEXA(pn, t2x2, t2y2); 2509 PUSH_TEXA(pn, t2x2, t2y2);
2518 PUSH_TEXA(pn, t2x1, t2y2); 2510 PUSH_TEXA(pn, t2x1, t2y2);
2519 2511
2520 /*
2521 if (mtex) 2512 if (mtex)
2522 { 2513 {
2523 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 2514 GLfloat tmx1, tmy1, tmx2, tmy2;
2524 t2y1 = (mtex->y + my) / (double)mtex->pt->h;
2525 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2526 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2527 2515
2528 PUSH_TEXM(pn, t2x1, t2y1); 2516 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
2529 PUSH_TEXM(pn, t2x2, t2y1); 2517 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
2530 PUSH_TEXM(pn, t2x1, t2y2); 2518 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2519 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2531 2520
2532 PUSH_TEXM(pn, t2x2, t2y1); 2521 PUSH_TEXM(pn, tmx1, tmy1);
2533 PUSH_TEXM(pn, t2x2, t2y2); 2522 PUSH_TEXM(pn, tmx2, tmy1);
2534 PUSH_TEXM(pn, t2x1, t2y2); 2523 PUSH_TEXM(pn, tmx1, tmy2);
2535 }
2536 */
2537 2524
2538 for (i = 0; i < 6; i++) 2525 PUSH_TEXM(pn, tmx2, tmy1);
2539 { 2526 PUSH_TEXM(pn, tmx2, tmy2);
2540 PUSH_COLOR(pn, r, g, b, a); 2527 PUSH_TEXM(pn, tmx1, tmy2);
2541 } 2528 }
2529
2530 PUSH_6_COLORS(pn, r, g, b, a);
2542} 2531}
2543 2532
2544void 2533void
@@ -2552,7 +2541,6 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2552 Eina_Bool smooth, Eina_Bool tex_only, 2541 Eina_Bool smooth, Eina_Bool tex_only,
2553 Evas_Colorspace cspace) 2542 Evas_Colorspace cspace)
2554{ 2543{
2555 int pnum, nv, nc, nu, nu2, nu3, na, i;
2556 const int points[6] = { 0, 1, 2, 0, 2, 3 }; 2544 const int points[6] = { 0, 1, 2, 0, 2, 3 };
2557 int x = 0, y = 0, w = 0, h = 0, px = 0, py = 0; 2545 int x = 0, y = 0, w = 0, h = 0, px = 0, py = 0;
2558 GLfloat tx[4], ty[4], t2x[4], t2y[4]; 2546 GLfloat tx[4], ty[4], t2x[4], t2y[4];
@@ -2561,7 +2549,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2561 GLuint prog = gc->shared->shader[SHADER_IMG].prog; 2549 GLuint prog = gc->shared->shader[SHADER_IMG].prog;
2562 Eina_Bool utexture = EINA_FALSE; 2550 Eina_Bool utexture = EINA_FALSE;
2563 Eina_Bool uvtexture = EINA_FALSE; 2551 Eina_Bool uvtexture = EINA_FALSE;
2564 int pn = 0; 2552 int pn = 0, i;
2565 int flat = 0; 2553 int flat = 0;
2566 2554
2567 if (!(gc->dc->render_op == EVAS_RENDER_COPY) && 2555 if (!(gc->dc->render_op == EVAS_RENDER_COPY) &&
@@ -2722,7 +2710,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2722 gc->pipe[pn].shader.cur_texu = tex->ptuv->texture; 2710 gc->pipe[pn].shader.cur_texu = tex->ptuv->texture;
2723 gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img; 2711 gc->pipe[pn].shader.cur_texu_dyn = tex->ptuv->dyn.img;
2724 } 2712 }
2725 gc->pipe[pn].shader.cur_texa = mtex ? mtex->pt->texture : 0; 2713 gc->pipe[pn].shader.cur_texm = mtex ? mtex->pt->texture : 0;
2726 gc->pipe[pn].shader.cur_prog = prog; 2714 gc->pipe[pn].shader.cur_prog = prog;
2727 gc->pipe[pn].shader.smooth = smooth; 2715 gc->pipe[pn].shader.smooth = smooth;
2728 gc->pipe[pn].shader.blend = blend; 2716 gc->pipe[pn].shader.blend = blend;
@@ -2738,16 +2726,11 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2738 gc->pipe[pn].array.use_texuv = 1; 2726 gc->pipe[pn].array.use_texuv = 1;
2739 gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0; 2727 gc->pipe[pn].array.use_texuv2 = (utexture || uvtexture) ? 1 : 0;
2740 gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0; 2728 gc->pipe[pn].array.use_texuv3 = (utexture) ? 1 : 0;
2741 gc->pipe[pn].array.use_texa = !!mtex; 2729 gc->pipe[pn].array.use_texm = !!mtex;
2742 gc->pipe[pn].array.use_texsam = 0; 2730 gc->pipe[pn].array.use_texsam = 0;
2743 2731
2744 pipe_region_expand(gc, pn, x, y, w, h); 2732 pipe_region_expand(gc, pn, x, y, w, h);
2745 2733 PIPE_GROW(gc, pn, 6);
2746 pnum = gc->pipe[pn].array.num;
2747 nv = pnum * 3; nc = pnum * 4; nu = pnum * 2; nu2 = pnum * 2; na = pnum * 2;
2748 nu2 = pnum * 2; nu3 = pnum * 2;
2749 gc->pipe[pn].array.num += 6;
2750 array_alloc(gc, pn);
2751 2734
2752 if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert)) 2735 if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
2753 { 2736 {
@@ -2806,20 +2789,20 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2806 2789
2807 if (mtex) 2790 if (mtex)
2808 { 2791 {
2809 GLfloat t2x1, t2y1, t2x2, t2y2; 2792 GLfloat tmx1, tmy1, tmx2, tmy2;
2810 2793
2811 t2x1 = (mtex->x + mx) / (double)mtex->pt->w; 2794 tmx1 = (mtex->x + mx) / (double)mtex->pt->w;
2812 t2y1 = (mtex->y + my) / (double)mtex->pt->h; 2795 tmy1 = (mtex->y + my) / (double)mtex->pt->h;
2813 t2x2 = (mtex->x + mx + mw) / (double)mtex->pt->w; 2796 tmx2 = (mtex->x + mx + mw) / (double)mtex->pt->w;
2814 t2y2 = (mtex->y + my + mh) / (double)mtex->pt->h; 2797 tmy2 = (mtex->y + my + mh) / (double)mtex->pt->h;
2815 2798
2816 PUSH_TEXA(pn, t2x1, t2y1); 2799 PUSH_TEXM(pn, tmx1, tmy1);
2817 PUSH_TEXA(pn, t2x2, t2y1); 2800 PUSH_TEXM(pn, tmx2, tmy1);
2818 PUSH_TEXA(pn, t2x1, t2y2); 2801 PUSH_TEXM(pn, tmx1, tmy2);
2819 2802
2820 PUSH_TEXA(pn, t2x2, t2y1); 2803 PUSH_TEXM(pn, tmx2, tmy1);
2821 PUSH_TEXA(pn, t2x2, t2y2); 2804 PUSH_TEXM(pn, tmx2, tmy2);
2822 PUSH_TEXA(pn, t2x1, t2y2); 2805 PUSH_TEXM(pn, tmx1, tmy2);
2823 } 2806 }
2824 2807
2825 if (!flat) 2808 if (!flat)
@@ -3178,6 +3161,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3178 unsigned char *texuv3_ptr = NULL; 3161 unsigned char *texuv3_ptr = NULL;
3179 unsigned char *texa_ptr = NULL; 3162 unsigned char *texa_ptr = NULL;
3180 unsigned char *texsam_ptr = NULL; 3163 unsigned char *texsam_ptr = NULL;
3164 unsigned char *texm_ptr = NULL;
3181 3165
3182 if (glsym_glMapBuffer && glsym_glUnmapBuffer) 3166 if (glsym_glMapBuffer && glsym_glUnmapBuffer)
3183 { 3167 {
@@ -3193,7 +3177,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3193 texuv3_ptr = texuv2_ptr + TEX_SIZE; 3177 texuv3_ptr = texuv2_ptr + TEX_SIZE;
3194 texa_ptr = texuv3_ptr + TEX_SIZE; 3178 texa_ptr = texuv3_ptr + TEX_SIZE;
3195 texsam_ptr = texa_ptr + TEX_SIZE; 3179 texsam_ptr = texa_ptr + TEX_SIZE;
3196# define END_POINTER (texsam_ptr + TEX_SIZE) 3180 texm_ptr = texsam_ptr + TEX_SIZE;
3181# define END_POINTER (texm_ptr + TEX_SIZE)
3197 3182
3198 glBindBuffer(GL_ARRAY_BUFFER, gc->pipe[i].array.buffer); 3183 glBindBuffer(GL_ARRAY_BUFFER, gc->pipe[i].array.buffer);
3199 if ((gc->pipe[i].array.buffer_alloc < (long)END_POINTER) || 3184 if ((gc->pipe[i].array.buffer_alloc < (long)END_POINTER) ||
@@ -3222,6 +3207,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3222 memcpy(x + (unsigned long)texa_ptr, gc->pipe[i].array.texa, TEX_SIZE); 3207 memcpy(x + (unsigned long)texa_ptr, gc->pipe[i].array.texa, TEX_SIZE);
3223 if (gc->pipe[i].array.use_texsam) 3208 if (gc->pipe[i].array.use_texsam)
3224 memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE); 3209 memcpy(x + (unsigned long)texsam_ptr, gc->pipe[i].array.texsam, TEX_SIZE);
3210 if (gc->pipe[i].array.use_texm)
3211 memcpy(x + (unsigned long)texm_ptr, gc->pipe[i].array.texm, TEX_SIZE);
3225/* 3212/*
3226 fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + %i + %i + %i + %i] <%i %i %i %i %i %i %i>\n", 3213 fprintf(stderr, "copy %i bytes [%i/%i slots] [%i + %i + %i + %i + %i + %i + %i] <%i %i %i %i %i %i %i>\n",
3227 (int)((unsigned char *)END_POINTER), 3214 (int)((unsigned char *)END_POINTER),
@@ -3234,7 +3221,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3234 gc->pipe[i].array.use_texuv2, 3221 gc->pipe[i].array.use_texuv2,
3235 gc->pipe[i].array.use_texuv3, 3222 gc->pipe[i].array.use_texuv3,
3236 gc->pipe[i].array.use_texa, 3223 gc->pipe[i].array.use_texa,
3237 gc->pipe[i].array.use_texsam); 3224 gc->pipe[i].array.use_texsam,
3225 gc->pipe[i].array.use_texm);
3238 */ 3226 */
3239 glsym_glUnmapBuffer(GL_ARRAY_BUFFER); 3227 glsym_glUnmapBuffer(GL_ARRAY_BUFFER);
3240 } 3228 }
@@ -3248,6 +3236,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3248 texuv3_ptr = (unsigned char *)gc->pipe[i].array.texuv3; 3236 texuv3_ptr = (unsigned char *)gc->pipe[i].array.texuv3;
3249 texa_ptr = (unsigned char *)gc->pipe[i].array.texa; 3237 texa_ptr = (unsigned char *)gc->pipe[i].array.texa;
3250 texsam_ptr = (unsigned char *)gc->pipe[i].array.texsam; 3238 texsam_ptr = (unsigned char *)gc->pipe[i].array.texsam;
3239 texm_ptr = (unsigned char *)gc->pipe[i].array.texm;
3251 } 3240 }
3252 glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, (void *)vertex_ptr); 3241 glVertexAttribPointer(SHAD_VERTEX, 3, GL_SHORT, GL_FALSE, 0, (void *)vertex_ptr);
3253 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 3242 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -3292,6 +3281,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3292 glDisableVertexAttribArray(SHAD_TEXUV); 3281 glDisableVertexAttribArray(SHAD_TEXUV);
3293 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 3282 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3294 } 3283 }
3284
3285 /* Alpha plane */
3295 if (gc->pipe[i].array.use_texa) 3286 if (gc->pipe[i].array.use_texa)
3296 { 3287 {
3297 glEnableVertexAttribArray(SHAD_TEXA); 3288 glEnableVertexAttribArray(SHAD_TEXA);
@@ -3333,8 +3324,52 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3333 else 3324 else
3334 { 3325 {
3335 glDisableVertexAttribArray(SHAD_TEXA); 3326 glDisableVertexAttribArray(SHAD_TEXA);
3327 }
3336 3328
3329 /* Mask surface */
3330 if (gc->pipe[i].array.use_texm)
3331 {
3332 glEnableVertexAttribArray(SHAD_TEXM);
3333 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3334 glVertexAttribPointer(SHAD_TEXM, 2, GL_FLOAT, GL_FALSE, 0, (void *)texm_ptr);
3335 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3336 glActiveTexture(GL_TEXTURE3);
3337 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3338 glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texm);
3339 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3340#ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT
3341 if (shared->info.anisotropic > 0.0)
3342 {
3343 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, shared->info.anisotropic);
3344 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3345 }
3346#endif
3347 if (gc->pipe[i].shader.smooth)
3348 {
3349 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
3350 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3351 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
3352 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3353 }
3354 else
3355 {
3356 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
3357 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3358 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
3359 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3360 }
3361 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
3362 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3363 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
3364 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3365 glActiveTexture(GL_TEXTURE0);
3366 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
3367 }
3368 else
3369 {
3370 glDisableVertexAttribArray(SHAD_TEXM);
3337 } 3371 }
3372
3338 if (gc->pipe[i].array.use_texsam) 3373 if (gc->pipe[i].array.use_texsam)
3339 { 3374 {
3340 glEnableVertexAttribArray(SHAD_TEXSAM); 3375 glEnableVertexAttribArray(SHAD_TEXSAM);
@@ -3489,6 +3524,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3489 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2); 3524 if (gc->pipe[i].array.texuv2) free(gc->pipe[i].array.texuv2);
3490 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3); 3525 if (gc->pipe[i].array.texuv3) free(gc->pipe[i].array.texuv3);
3491 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam); 3526 if (gc->pipe[i].array.texsam) free(gc->pipe[i].array.texsam);
3527 if (gc->pipe[i].array.texm) free(gc->pipe[i].array.texm);
3492 3528
3493 gc->pipe[i].array.line = 0; 3529 gc->pipe[i].array.line = 0;
3494 gc->pipe[i].array.use_vertex = 0; 3530 gc->pipe[i].array.use_vertex = 0;
@@ -3498,6 +3534,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3498 gc->pipe[i].array.use_texuv3 = 0; 3534 gc->pipe[i].array.use_texuv3 = 0;
3499 gc->pipe[i].array.use_texa = 0; 3535 gc->pipe[i].array.use_texa = 0;
3500 gc->pipe[i].array.use_texsam = 0; 3536 gc->pipe[i].array.use_texsam = 0;
3537 gc->pipe[i].array.use_texm = 0;
3501 3538
3502 gc->pipe[i].array.vertex = NULL; 3539 gc->pipe[i].array.vertex = NULL;
3503 gc->pipe[i].array.color = NULL; 3540 gc->pipe[i].array.color = NULL;
@@ -3506,6 +3543,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
3506 gc->pipe[i].array.texuv2 = NULL; 3543 gc->pipe[i].array.texuv2 = NULL;
3507 gc->pipe[i].array.texuv3 = NULL; 3544 gc->pipe[i].array.texuv3 = NULL;
3508 gc->pipe[i].array.texsam = NULL; 3545 gc->pipe[i].array.texsam = NULL;
3546 gc->pipe[i].array.texm = NULL;
3509 3547
3510 gc->pipe[i].array.num = 0; 3548 gc->pipe[i].array.num = 0;
3511 gc->pipe[i].array.alloc = 0; 3549 gc->pipe[i].array.alloc = 0;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index aa70e2ee86..d0648c6846 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -78,6 +78,7 @@ _evas_gl_common_shader_program_binary_init(Evas_GL_Program *p,
78 glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3"); 78 glBindAttribLocation(p->prog, SHAD_TEXUV3, "tex_coord3");
79 glBindAttribLocation(p->prog, SHAD_TEXA, "tex_coorda"); 79 glBindAttribLocation(p->prog, SHAD_TEXA, "tex_coorda");
80 glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample"); 80 glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
81 glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
81 82
82 glGetProgramiv(p->prog, GL_LINK_STATUS, &ok); 83 glGetProgramiv(p->prog, GL_LINK_STATUS, &ok);
83 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 84 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
@@ -203,6 +204,8 @@ _evas_gl_common_shader_program_source_init(Evas_GL_Program *p,
203 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 204 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
204 glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample"); 205 glBindAttribLocation(p->prog, SHAD_TEXSAM, "tex_sample");
205 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 206 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
207 glBindAttribLocation(p->prog, SHAD_TEXM, "tex_coordm");
208 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
206 209
207 glLinkProgram(p->prog); 210 glLinkProgram(p->prog);
208 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 211 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
diff --git a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
index 7f3f53630d..08b88675d4 100644
--- a/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
+++ b/src/modules/evas/engines/gl_common/shader/evas_gl_shaders.x
@@ -58,13 +58,13 @@ static const char const font_mask_frag_glsl[] =
58 "#endif\n" 58 "#endif\n"
59 "#endif\n" 59 "#endif\n"
60 "uniform sampler2D tex;\n" 60 "uniform sampler2D tex;\n"
61 "uniform sampler2D texa;\n" 61 "uniform sampler2D texm;\n"
62 "varying vec4 col;\n" 62 "varying vec4 col;\n"
63 "varying vec2 tex_c;\n" 63 "varying vec2 tex_c;\n"
64 "varying vec2 tex_a;\n" 64 "varying vec2 tex_m;\n"
65 "void main()\n" 65 "void main()\n"
66 "{\n" 66 "{\n"
67 " gl_FragColor = texture2D(tex, tex_c.xy).aaaa * texture2D(texa, tex_a.xy).aaaa * col;\n" 67 " gl_FragColor = texture2D(tex, tex_c.xy).aaaa * texture2D(texm, tex_m.xy).aaaa * col;\n"
68 "}\n"; 68 "}\n";
69Evas_GL_Program_Source shader_font_mask_frag_src = 69Evas_GL_Program_Source shader_font_mask_frag_src =
70{ 70{
@@ -80,17 +80,17 @@ static const char const font_mask_vert_glsl[] =
80 "attribute vec4 vertex;\n" 80 "attribute vec4 vertex;\n"
81 "attribute vec4 color;\n" 81 "attribute vec4 color;\n"
82 "attribute vec2 tex_coord;\n" 82 "attribute vec2 tex_coord;\n"
83 "attribute vec2 tex_coorda;\n" 83 "attribute vec2 tex_coordm;\n"
84 "uniform mat4 mvp;\n" 84 "uniform mat4 mvp;\n"
85 "varying vec4 col;\n" 85 "varying vec4 col;\n"
86 "varying vec2 tex_c;\n" 86 "varying vec2 tex_c;\n"
87 "varying vec2 tex_a;\n" 87 "varying vec2 tex_m;\n"
88 "void main()\n" 88 "void main()\n"
89 "{\n" 89 "{\n"
90 " gl_Position = mvp * vertex;\n" 90 " gl_Position = mvp * vertex;\n"
91 " col = color;\n" 91 " col = color;\n"
92 " tex_c = tex_coord;\n" 92 " tex_c = tex_coord;\n"
93 " tex_a = tex_coorda;\n" 93 " tex_m = tex_coordm;\n"
94 "}\n"; 94 "}\n";
95Evas_GL_Program_Source shader_font_mask_vert_src = 95Evas_GL_Program_Source shader_font_mask_vert_src =
96{ 96{
@@ -2241,13 +2241,13 @@ static const char const img_mask_frag_glsl[] =
2241 "#endif\n" 2241 "#endif\n"
2242 "#endif\n" 2242 "#endif\n"
2243 "uniform sampler2D tex;\n" 2243 "uniform sampler2D tex;\n"
2244 "uniform sampler2D texa;\n" 2244 "uniform sampler2D texm;\n"
2245 "varying vec4 col;\n" 2245 "varying vec4 col;\n"
2246 "varying vec2 coord_c;\n" 2246 "varying vec2 coord_c;\n"
2247 "varying vec2 coord_a;\n" 2247 "varying vec2 coord_m;\n"
2248 "void main()\n" 2248 "void main()\n"
2249 "{\n" 2249 "{\n"
2250 " gl_FragColor = texture2D(texa, coord_a.xy).a * texture2D(tex, coord_c.xy).bgra * col;\n" 2250 " gl_FragColor = texture2D(texm, coord_m.xy).a * texture2D(tex, coord_c.xy).bgra * col;\n"
2251 "}\n"; 2251 "}\n";
2252Evas_GL_Program_Source shader_img_mask_frag_src = 2252Evas_GL_Program_Source shader_img_mask_frag_src =
2253{ 2253{
@@ -2263,17 +2263,17 @@ static const char const img_mask_vert_glsl[] =
2263 "attribute vec4 vertex;\n" 2263 "attribute vec4 vertex;\n"
2264 "attribute vec4 color;\n" 2264 "attribute vec4 color;\n"
2265 "attribute vec2 tex_coord;\n" 2265 "attribute vec2 tex_coord;\n"
2266 "attribute vec2 tex_coorda;\n" 2266 "attribute vec2 tex_coordm;\n"
2267 "uniform mat4 mvp;\n" 2267 "uniform mat4 mvp;\n"
2268 "varying vec4 col;\n" 2268 "varying vec4 col;\n"
2269 "varying vec2 coord_c;\n" 2269 "varying vec2 coord_c;\n"
2270 "varying vec2 coord_a;\n" 2270 "varying vec2 coord_m;\n"
2271 "void main()\n" 2271 "void main()\n"
2272 "{\n" 2272 "{\n"
2273 " gl_Position = mvp * vertex;\n" 2273 " gl_Position = mvp * vertex;\n"
2274 " col = color;\n" 2274 " col = color;\n"
2275 " coord_c = tex_coord;\n" 2275 " coord_c = tex_coord;\n"
2276 " coord_a = tex_coorda;\n" 2276 " coord_m = tex_coordm;\n"
2277 "}\n"; 2277 "}\n";
2278Evas_GL_Program_Source shader_img_mask_vert_src = 2278Evas_GL_Program_Source shader_img_mask_vert_src =
2279{ 2279{
@@ -2291,12 +2291,12 @@ static const char const img_mask_nomul_frag_glsl[] =
2291 "#endif\n" 2291 "#endif\n"
2292 "#endif\n" 2292 "#endif\n"
2293 "uniform sampler2D tex;\n" 2293 "uniform sampler2D tex;\n"
2294 "uniform sampler2D texa;\n" 2294 "uniform sampler2D texm;\n"
2295 "varying vec2 coord_c;\n" 2295 "varying vec2 coord_c;\n"
2296 "varying vec2 coord_a;\n" 2296 "varying vec2 coord_m;\n"
2297 "void main()\n" 2297 "void main()\n"
2298 "{\n" 2298 "{\n"
2299 " gl_FragColor = texture2D(tex, coord_c.xy) * texture2D(texa, coord_a).a;\n" 2299 " gl_FragColor = texture2D(tex, coord_c.xy) * texture2D(texm, coord_m).a;\n"
2300 "}\n"; 2300 "}\n";
2301Evas_GL_Program_Source shader_img_mask_nomul_frag_src = 2301Evas_GL_Program_Source shader_img_mask_nomul_frag_src =
2302{ 2302{
@@ -2311,15 +2311,15 @@ static const char const img_mask_nomul_vert_glsl[] =
2311 "#endif\n" 2311 "#endif\n"
2312 "attribute vec4 vertex;\n" 2312 "attribute vec4 vertex;\n"
2313 "attribute vec2 tex_coord;\n" 2313 "attribute vec2 tex_coord;\n"
2314 "attribute vec2 tex_coorda;\n" 2314 "attribute vec2 tex_coordm;\n"
2315 "uniform mat4 mvp;\n" 2315 "uniform mat4 mvp;\n"
2316 "varying vec2 coord_c;\n" 2316 "varying vec2 coord_c;\n"
2317 "varying vec2 coord_a;\n" 2317 "varying vec2 coord_m;\n"
2318 "void main()\n" 2318 "void main()\n"
2319 "{\n" 2319 "{\n"
2320 " gl_Position = mvp * vertex;\n" 2320 " gl_Position = mvp * vertex;\n"
2321 " coord_c = tex_coord;\n" 2321 " coord_c = tex_coord;\n"
2322 " coord_a = tex_coorda;\n" 2322 " coord_m = tex_coordm;\n"
2323 "}\n"; 2323 "}\n";
2324Evas_GL_Program_Source shader_img_mask_nomul_vert_src = 2324Evas_GL_Program_Source shader_img_mask_nomul_vert_src =
2325{ 2325{
@@ -2337,13 +2337,13 @@ static const char const img_mask_bgra_frag_glsl[] =
2337 "#endif\n" 2337 "#endif\n"
2338 "#endif\n" 2338 "#endif\n"
2339 "uniform sampler2D tex;\n" 2339 "uniform sampler2D tex;\n"
2340 "uniform sampler2D texa;\n" 2340 "uniform sampler2D texm;\n"
2341 "varying vec4 col;\n" 2341 "varying vec4 col;\n"
2342 "varying vec2 coord_c;\n" 2342 "varying vec2 coord_c;\n"
2343 "varying vec2 coord_a;\n" 2343 "varying vec2 coord_m;\n"
2344 "void main()\n" 2344 "void main()\n"
2345 "{\n" 2345 "{\n"
2346 " gl_FragColor = texture2D(texa, coord_a.xy).a * texture2D(tex, coord_c.xy) * col;\n" 2346 " gl_FragColor = texture2D(texm, coord_m.xy).a * texture2D(tex, coord_c.xy) * col;\n"
2347 "}\n"; 2347 "}\n";
2348Evas_GL_Program_Source shader_img_mask_bgra_frag_src = 2348Evas_GL_Program_Source shader_img_mask_bgra_frag_src =
2349{ 2349{
@@ -2359,17 +2359,17 @@ static const char const img_mask_bgra_vert_glsl[] =
2359 "attribute vec4 vertex;\n" 2359 "attribute vec4 vertex;\n"
2360 "attribute vec4 color;\n" 2360 "attribute vec4 color;\n"
2361 "attribute vec2 tex_coord;\n" 2361 "attribute vec2 tex_coord;\n"
2362 "attribute vec2 tex_coorda;\n" 2362 "attribute vec2 tex_coordm;\n"
2363 "uniform mat4 mvp;\n" 2363 "uniform mat4 mvp;\n"
2364 "varying vec4 col;\n" 2364 "varying vec4 col;\n"
2365 "varying vec2 coord_c;\n" 2365 "varying vec2 coord_c;\n"
2366 "varying vec2 coord_a;\n" 2366 "varying vec2 coord_m;\n"
2367 "void main()\n" 2367 "void main()\n"
2368 "{\n" 2368 "{\n"
2369 " gl_Position = mvp * vertex;\n" 2369 " gl_Position = mvp * vertex;\n"
2370 " col = color;\n" 2370 " col = color;\n"
2371 " coord_c = tex_coord;\n" 2371 " coord_c = tex_coord;\n"
2372 " coord_a = tex_coorda;\n" 2372 " coord_m = tex_coordm;\n"
2373 "}\n"; 2373 "}\n";
2374Evas_GL_Program_Source shader_img_mask_bgra_vert_src = 2374Evas_GL_Program_Source shader_img_mask_bgra_vert_src =
2375{ 2375{
@@ -2387,12 +2387,12 @@ static const char const img_mask_bgra_nomul_frag_glsl[] =
2387 "#endif\n" 2387 "#endif\n"
2388 "#endif\n" 2388 "#endif\n"
2389 "uniform sampler2D tex;\n" 2389 "uniform sampler2D tex;\n"
2390 "uniform sampler2D texa;\n" 2390 "uniform sampler2D texm;\n"
2391 "varying vec2 coord_c;\n" 2391 "varying vec2 coord_c;\n"
2392 "varying vec2 coord_a;\n" 2392 "varying vec2 coord_m;\n"
2393 "void main()\n" 2393 "void main()\n"
2394 "{\n" 2394 "{\n"
2395 " gl_FragColor = texture2D(texa, coord_a.xy).a * texture2D(tex, coord_c.xy);\n" 2395 " gl_FragColor = texture2D(texm, coord_m.xy).a * texture2D(tex, coord_c.xy);\n"
2396 "}\n"; 2396 "}\n";
2397Evas_GL_Program_Source shader_img_mask_bgra_nomul_frag_src = 2397Evas_GL_Program_Source shader_img_mask_bgra_nomul_frag_src =
2398{ 2398{
@@ -2407,15 +2407,15 @@ static const char const img_mask_bgra_nomul_vert_glsl[] =
2407 "#endif\n" 2407 "#endif\n"
2408 "attribute vec4 vertex;\n" 2408 "attribute vec4 vertex;\n"
2409 "attribute vec2 tex_coord;\n" 2409 "attribute vec2 tex_coord;\n"
2410 "attribute vec2 tex_coorda;\n" 2410 "attribute vec2 tex_coordm;\n"
2411 "uniform mat4 mvp;\n" 2411 "uniform mat4 mvp;\n"
2412 "varying vec2 coord_c;\n" 2412 "varying vec2 coord_c;\n"
2413 "varying vec2 coord_a;\n" 2413 "varying vec2 coord_m;\n"
2414 "void main()\n" 2414 "void main()\n"
2415 "{\n" 2415 "{\n"
2416 " gl_Position = mvp * vertex;\n" 2416 " gl_Position = mvp * vertex;\n"
2417 " coord_c = tex_coord;\n" 2417 " coord_c = tex_coord;\n"
2418 " coord_a = tex_coorda;\n" 2418 " coord_m = tex_coordm;\n"
2419 "}\n"; 2419 "}\n";
2420Evas_GL_Program_Source shader_img_mask_bgra_nomul_vert_src = 2420Evas_GL_Program_Source shader_img_mask_bgra_nomul_vert_src =
2421{ 2421{
@@ -2432,9 +2432,9 @@ static const char const yuv_mask_frag_glsl[] =
2432 "precision mediump float;\n" 2432 "precision mediump float;\n"
2433 "#endif\n" 2433 "#endif\n"
2434 "#endif\n" 2434 "#endif\n"
2435 "uniform sampler2D tex, texu, texv, texa;\n" 2435 "uniform sampler2D tex, texu, texv, texm;\n"
2436 "varying vec4 col;\n" 2436 "varying vec4 col;\n"
2437 "varying vec2 tex_c, tex_c2, tex_c3, tex_a;\n" 2437 "varying vec2 tex_c, tex_c2, tex_c3, tex_m;\n"
2438 "void main()\n" 2438 "void main()\n"
2439 "{\n" 2439 "{\n"
2440 " float r, g, b, y, u, v;\n" 2440 " float r, g, b, y, u, v;\n"
@@ -2447,7 +2447,7 @@ static const char const yuv_mask_frag_glsl[] =
2447 " r = y + (1.402 * v);\n" 2447 " r = y + (1.402 * v);\n"
2448 " g = y - (0.34414 * u) - (0.71414 * v);\n" 2448 " g = y - (0.34414 * u) - (0.71414 * v);\n"
2449 " b = y + (1.772 * u);\n" 2449 " b = y + (1.772 * u);\n"
2450 " gl_FragColor = vec4(r, g, b, 1.0) * texture2D(texa, tex_a.xy).a * col;\n" 2450 " gl_FragColor = vec4(r, g, b, 1.0) * texture2D(texm, tex_m.xy).a * col;\n"
2451 "}\n"; 2451 "}\n";
2452Evas_GL_Program_Source shader_yuv_mask_frag_src = 2452Evas_GL_Program_Source shader_yuv_mask_frag_src =
2453{ 2453{
@@ -2462,10 +2462,10 @@ static const char const yuv_mask_vert_glsl[] =
2462 "#endif\n" 2462 "#endif\n"
2463 "attribute vec4 vertex;\n" 2463 "attribute vec4 vertex;\n"
2464 "attribute vec4 color;\n" 2464 "attribute vec4 color;\n"
2465 "attribute vec2 tex_coord, tex_coord2, tex_coord3, tex_coorda;\n" 2465 "attribute vec2 tex_coord, tex_coord2, tex_coord3, tex_coordm;\n"
2466 "uniform mat4 mvp;\n" 2466 "uniform mat4 mvp;\n"
2467 "varying vec4 col;\n" 2467 "varying vec4 col;\n"
2468 "varying vec2 tex_c, tex_c2, tex_c3, tex_a;\n" 2468 "varying vec2 tex_c, tex_c2, tex_c3, tex_m;\n"
2469 "void main()\n" 2469 "void main()\n"
2470 "{\n" 2470 "{\n"
2471 " gl_Position = mvp * vertex;\n" 2471 " gl_Position = mvp * vertex;\n"
@@ -2473,7 +2473,7 @@ static const char const yuv_mask_vert_glsl[] =
2473 " tex_c = tex_coord;\n" 2473 " tex_c = tex_coord;\n"
2474 " tex_c2 = tex_coord2;\n" 2474 " tex_c2 = tex_coord2;\n"
2475 " tex_c3 = tex_coord3;\n" 2475 " tex_c3 = tex_coord3;\n"
2476 " tex_a = tex_coorda;\n" 2476 " tex_m = tex_coordm;\n"
2477 "}\n"; 2477 "}\n";
2478Evas_GL_Program_Source shader_yuv_mask_vert_src = 2478Evas_GL_Program_Source shader_yuv_mask_vert_src =
2479{ 2479{
@@ -2490,9 +2490,9 @@ static const char const nv12_mask_frag_glsl[] =
2490 "precision mediump float;\n" 2490 "precision mediump float;\n"
2491 "#endif\n" 2491 "#endif\n"
2492 "#endif\n" 2492 "#endif\n"
2493 "uniform sampler2D tex, texuv, texa;\n" 2493 "uniform sampler2D tex, texuv, texm;\n"
2494 "varying vec4 col;\n" 2494 "varying vec4 col;\n"
2495 "varying vec2 tex_c, tex_cuv, tex_a;\n" 2495 "varying vec2 tex_c, tex_cuv, tex_m;\n"
2496 "void main()\n" 2496 "void main()\n"
2497 "{\n" 2497 "{\n"
2498 " float y,u,v,vmu,r,g,b;\n" 2498 " float y,u,v,vmu,r,g,b;\n"
@@ -2508,7 +2508,7 @@ static const char const nv12_mask_frag_glsl[] =
2508 " r=y+v;\n" 2508 " r=y+v;\n"
2509 " g=y-vmu;\n" 2509 " g=y-vmu;\n"
2510 " b=y+u;\n" 2510 " b=y+u;\n"
2511 " gl_FragColor = vec4(r,g,b,1.0) * texture2D(texa, tex_a.xy).a * col;\n" 2511 " gl_FragColor = vec4(r,g,b,1.0) * texture2D(tex, tex_m.xy).a * col;\n"
2512 "}\n"; 2512 "}\n";
2513Evas_GL_Program_Source shader_nv12_mask_frag_src = 2513Evas_GL_Program_Source shader_nv12_mask_frag_src =
2514{ 2514{
@@ -2523,17 +2523,17 @@ static const char const nv12_mask_vert_glsl[] =
2523 "#endif\n" 2523 "#endif\n"
2524 "attribute vec4 vertex;\n" 2524 "attribute vec4 vertex;\n"
2525 "attribute vec4 color;\n" 2525 "attribute vec4 color;\n"
2526 "attribute vec2 tex_coord, tex_coord2, tex_coorda;\n" 2526 "attribute vec2 tex_coord, tex_coord2, tex_coordm;\n"
2527 "uniform mat4 mvp;\n" 2527 "uniform mat4 mvp;\n"
2528 "varying vec4 col;\n" 2528 "varying vec4 col;\n"
2529 "varying vec2 tex_c, tex_cuv, tex_a;\n" 2529 "varying vec2 tex_c, tex_cuv, tex_m;\n"
2530 "void main()\n" 2530 "void main()\n"
2531 "{\n" 2531 "{\n"
2532 " gl_Position = mvp * vertex;\n" 2532 " gl_Position = mvp * vertex;\n"
2533 " col = color;\n" 2533 " col = color;\n"
2534 " tex_c = tex_coord;\n" 2534 " tex_c = tex_coord;\n"
2535 " tex_cuv = tex_coord2 * 0.5;\n" 2535 " tex_cuv = tex_coord2 * 0.5;\n"
2536 " tex_a = tex_coorda;\n" 2536 " tex_m = tex_coordm;\n"
2537 "}\n"; 2537 "}\n";
2538Evas_GL_Program_Source shader_nv12_mask_vert_src = 2538Evas_GL_Program_Source shader_nv12_mask_vert_src =
2539{ 2539{
@@ -2550,9 +2550,9 @@ static const char const yuy2_mask_frag_glsl[] =
2550 "precision mediump float;\n" 2550 "precision mediump float;\n"
2551 "#endif\n" 2551 "#endif\n"
2552 "#endif\n" 2552 "#endif\n"
2553 "uniform sampler2D tex, texuv, texa;\n" 2553 "uniform sampler2D tex, texuv, texm;\n"
2554 "varying vec4 col;\n" 2554 "varying vec4 col;\n"
2555 "varying vec2 tex_c, tex_cuv, tex_a;\n" 2555 "varying vec2 tex_c, tex_cuv, tex_m;\n"
2556 "void main()\n" 2556 "void main()\n"
2557 "{\n" 2557 "{\n"
2558 " float y,u,v,vmu,r,g,b;\n" 2558 " float y,u,v,vmu,r,g,b;\n"
@@ -2567,7 +2567,7 @@ static const char const yuy2_mask_frag_glsl[] =
2567 " r=y+v;\n" 2567 " r=y+v;\n"
2568 " g=y-vmu;\n" 2568 " g=y-vmu;\n"
2569 " b=y+u;\n" 2569 " b=y+u;\n"
2570 " gl_FragColor = vec4(r,g,b,1.0) * texture2D(texa, tex_a.xy).a * col;\n" 2570 " gl_FragColor = vec4(r,g,b,1.0) * texture2D(texm, tex_m.xy).a * col;\n"
2571 "}\n"; 2571 "}\n";
2572Evas_GL_Program_Source shader_yuy2_mask_frag_src = 2572Evas_GL_Program_Source shader_yuy2_mask_frag_src =
2573{ 2573{
@@ -2582,17 +2582,17 @@ static const char const yuy2_mask_vert_glsl[] =
2582 "#endif\n" 2582 "#endif\n"
2583 "attribute vec4 vertex;\n" 2583 "attribute vec4 vertex;\n"
2584 "attribute vec4 color;\n" 2584 "attribute vec4 color;\n"
2585 "attribute vec2 tex_coord, tex_coord2, tex_coorda;\n" 2585 "attribute vec2 tex_coord, tex_coord2, tex_coordm;\n"
2586 "uniform mat4 mvp;\n" 2586 "uniform mat4 mvp;\n"
2587 "varying vec4 col;\n" 2587 "varying vec4 col;\n"
2588 "varying vec2 tex_c, tex_cuv, tex_a;\n" 2588 "varying vec2 tex_c, tex_cuv, tex_m;\n"
2589 "void main()\n" 2589 "void main()\n"
2590 "{\n" 2590 "{\n"
2591 " gl_Position = mvp * vertex;\n" 2591 " gl_Position = mvp * vertex;\n"
2592 " col = color;\n" 2592 " col = color;\n"
2593 " tex_c = tex_coord;\n" 2593 " tex_c = tex_coord;\n"
2594 " tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);\n" 2594 " tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);\n"
2595 " tex_a = tex_coorda;\n" 2595 " tex_m = tex_coordm;\n"
2596 "}\n"; 2596 "}\n";
2597Evas_GL_Program_Source shader_yuy2_mask_vert_src = 2597Evas_GL_Program_Source shader_yuy2_mask_vert_src =
2598{ 2598{
diff --git a/src/modules/evas/engines/gl_common/shader/font_mask_frag.shd b/src/modules/evas/engines/gl_common/shader/font_mask_frag.shd
index 950431e8c5..48c926ceb8 100644
--- a/src/modules/evas/engines/gl_common/shader/font_mask_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/font_mask_frag.shd
@@ -6,12 +6,12 @@ precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex; 8uniform sampler2D tex;
9uniform sampler2D texa; 9uniform sampler2D texm;
10varying vec4 col; 10varying vec4 col;
11varying vec2 tex_c; 11varying vec2 tex_c;
12varying vec2 tex_a; 12varying vec2 tex_m;
13void main() 13void main()
14{ 14{
15 gl_FragColor = texture2D(tex, tex_c.xy).aaaa * texture2D(texa, tex_a.xy).aaaa * col; 15 gl_FragColor = texture2D(tex, tex_c.xy).aaaa * texture2D(texm, tex_m.xy).aaaa * col;
16} 16}
17 17
diff --git a/src/modules/evas/engines/gl_common/shader/font_mask_vert.shd b/src/modules/evas/engines/gl_common/shader/font_mask_vert.shd
index 3b5ea7430d..2651689e13 100644
--- a/src/modules/evas/engines/gl_common/shader/font_mask_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/font_mask_vert.shd
@@ -4,16 +4,16 @@ precision highp float;
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec4 color; 5attribute vec4 color;
6attribute vec2 tex_coord; 6attribute vec2 tex_coord;
7attribute vec2 tex_coorda; 7attribute vec2 tex_coordm;
8uniform mat4 mvp; 8uniform mat4 mvp;
9varying vec4 col; 9varying vec4 col;
10varying vec2 tex_c; 10varying vec2 tex_c;
11varying vec2 tex_a; 11varying vec2 tex_m;
12void main() 12void main()
13{ 13{
14 gl_Position = mvp * vertex; 14 gl_Position = mvp * vertex;
15 col = color; 15 col = color;
16 tex_c = tex_coord; 16 tex_c = tex_coord;
17 tex_a = tex_coorda; 17 tex_m = tex_coordm;
18} 18}
19 19
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_frag.shd b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_frag.shd
index 8583474f58..ad567375d1 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_frag.shd
@@ -6,12 +6,12 @@ precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex; 8uniform sampler2D tex;
9uniform sampler2D texa; 9uniform sampler2D texm;
10varying vec4 col; 10varying vec4 col;
11varying vec2 coord_c; 11varying vec2 coord_c;
12varying vec2 coord_a; 12varying vec2 coord_m;
13void main() 13void main()
14{ 14{
15 gl_FragColor = texture2D(texa, coord_a.xy).a * texture2D(tex, coord_c.xy) * col; 15 gl_FragColor = texture2D(texm, coord_m.xy).a * texture2D(tex, coord_c.xy) * col;
16} 16}
17 17
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_frag.shd
index 4556cde3d1..5fc393b3d0 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_frag.shd
@@ -6,11 +6,11 @@ precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex; 8uniform sampler2D tex;
9uniform sampler2D texa; 9uniform sampler2D texm;
10varying vec2 coord_c; 10varying vec2 coord_c;
11varying vec2 coord_a; 11varying vec2 coord_m;
12void main() 12void main()
13{ 13{
14 gl_FragColor = texture2D(texa, coord_a.xy).a * texture2D(tex, coord_c.xy); 14 gl_FragColor = texture2D(texm, coord_m.xy).a * texture2D(tex, coord_c.xy);
15} 15}
16 16
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_vert.shd
index a1debf63f2..973402f7dc 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_nomul_vert.shd
@@ -3,14 +3,14 @@ precision highp float;
3#endif 3#endif
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec2 tex_coord; 5attribute vec2 tex_coord;
6attribute vec2 tex_coorda; 6attribute vec2 tex_coordm;
7uniform mat4 mvp; 7uniform mat4 mvp;
8varying vec2 coord_c; 8varying vec2 coord_c;
9varying vec2 coord_a; 9varying vec2 coord_m;
10void main() 10void main()
11{ 11{
12 gl_Position = mvp * vertex; 12 gl_Position = mvp * vertex;
13 coord_c = tex_coord; 13 coord_c = tex_coord;
14 coord_a = tex_coorda; 14 coord_m = tex_coordm;
15} 15}
16 16
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_vert.shd b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_vert.shd
index 3cd1740771..04da2aa8d7 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_bgra_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_bgra_vert.shd
@@ -4,16 +4,16 @@ precision highp float;
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec4 color; 5attribute vec4 color;
6attribute vec2 tex_coord; 6attribute vec2 tex_coord;
7attribute vec2 tex_coorda; 7attribute vec2 tex_coordm;
8uniform mat4 mvp; 8uniform mat4 mvp;
9varying vec4 col; 9varying vec4 col;
10varying vec2 coord_c; 10varying vec2 coord_c;
11varying vec2 coord_a; 11varying vec2 coord_m;
12void main() 12void main()
13{ 13{
14 gl_Position = mvp * vertex; 14 gl_Position = mvp * vertex;
15 col = color; 15 col = color;
16 coord_c = tex_coord; 16 coord_c = tex_coord;
17 coord_a = tex_coorda; 17 coord_m = tex_coordm;
18} 18}
19 19
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_frag.shd b/src/modules/evas/engines/gl_common/shader/img_mask_frag.shd
index fadbd281d0..34b1af9291 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_frag.shd
@@ -6,12 +6,12 @@ precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex; 8uniform sampler2D tex;
9uniform sampler2D texa; 9uniform sampler2D texm;
10varying vec4 col; 10varying vec4 col;
11varying vec2 coord_c; 11varying vec2 coord_c;
12varying vec2 coord_a; 12varying vec2 coord_m;
13void main() 13void main()
14{ 14{
15 gl_FragColor = texture2D(texa, coord_a.xy).a * texture2D(tex, coord_c.xy).bgra * col; 15 gl_FragColor = texture2D(texm, coord_m.xy).a * texture2D(tex, coord_c.xy).bgra * col;
16} 16}
17 17
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_nomul_frag.shd b/src/modules/evas/engines/gl_common/shader/img_mask_nomul_frag.shd
index b93d6fb6d5..e172ebe91a 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_nomul_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_nomul_frag.shd
@@ -6,11 +6,11 @@ precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex; 8uniform sampler2D tex;
9uniform sampler2D texa; 9uniform sampler2D texm;
10varying vec2 coord_c; 10varying vec2 coord_c;
11varying vec2 coord_a; 11varying vec2 coord_m;
12void main() 12void main()
13{ 13{
14 gl_FragColor = texture2D(tex, coord_c.xy) * texture2D(texa, coord_a).a; 14 gl_FragColor = texture2D(tex, coord_c.xy) * texture2D(texm, coord_m).a;
15} 15}
16 16
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_nomul_vert.shd b/src/modules/evas/engines/gl_common/shader/img_mask_nomul_vert.shd
index a1debf63f2..973402f7dc 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_nomul_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_nomul_vert.shd
@@ -3,14 +3,14 @@ precision highp float;
3#endif 3#endif
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec2 tex_coord; 5attribute vec2 tex_coord;
6attribute vec2 tex_coorda; 6attribute vec2 tex_coordm;
7uniform mat4 mvp; 7uniform mat4 mvp;
8varying vec2 coord_c; 8varying vec2 coord_c;
9varying vec2 coord_a; 9varying vec2 coord_m;
10void main() 10void main()
11{ 11{
12 gl_Position = mvp * vertex; 12 gl_Position = mvp * vertex;
13 coord_c = tex_coord; 13 coord_c = tex_coord;
14 coord_a = tex_coorda; 14 coord_m = tex_coordm;
15} 15}
16 16
diff --git a/src/modules/evas/engines/gl_common/shader/img_mask_vert.shd b/src/modules/evas/engines/gl_common/shader/img_mask_vert.shd
index 3cd1740771..04da2aa8d7 100644
--- a/src/modules/evas/engines/gl_common/shader/img_mask_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/img_mask_vert.shd
@@ -4,16 +4,16 @@ precision highp float;
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec4 color; 5attribute vec4 color;
6attribute vec2 tex_coord; 6attribute vec2 tex_coord;
7attribute vec2 tex_coorda; 7attribute vec2 tex_coordm;
8uniform mat4 mvp; 8uniform mat4 mvp;
9varying vec4 col; 9varying vec4 col;
10varying vec2 coord_c; 10varying vec2 coord_c;
11varying vec2 coord_a; 11varying vec2 coord_m;
12void main() 12void main()
13{ 13{
14 gl_Position = mvp * vertex; 14 gl_Position = mvp * vertex;
15 col = color; 15 col = color;
16 coord_c = tex_coord; 16 coord_c = tex_coord;
17 coord_a = tex_coorda; 17 coord_m = tex_coordm;
18} 18}
19 19
diff --git a/src/modules/evas/engines/gl_common/shader/nv12_mask_frag.shd b/src/modules/evas/engines/gl_common/shader/nv12_mask_frag.shd
index f78416e355..aa221d1365 100644
--- a/src/modules/evas/engines/gl_common/shader/nv12_mask_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/nv12_mask_frag.shd
@@ -5,9 +5,9 @@ precision highp float;
5precision mediump float; 5precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex, texuv, texa; 8uniform sampler2D tex, texuv, texm;
9varying vec4 col; 9varying vec4 col;
10varying vec2 tex_c, tex_cuv, tex_a; 10varying vec2 tex_c, tex_cuv, tex_m;
11void main() 11void main()
12{ 12{
13 float y,u,v,vmu,r,g,b; 13 float y,u,v,vmu,r,g,b;
@@ -26,6 +26,6 @@ void main()
26 g=y-vmu; 26 g=y-vmu;
27 b=y+u; 27 b=y+u;
28 28
29 gl_FragColor = vec4(r,g,b,1.0) * texture2D(texa, tex_a.xy).a * col; 29 gl_FragColor = vec4(r,g,b,1.0) * texture2D(tex, tex_m.xy).a * col;
30} 30}
31 31
diff --git a/src/modules/evas/engines/gl_common/shader/nv12_mask_vert.shd b/src/modules/evas/engines/gl_common/shader/nv12_mask_vert.shd
index bce12af84c..b77a0a589a 100644
--- a/src/modules/evas/engines/gl_common/shader/nv12_mask_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/nv12_mask_vert.shd
@@ -3,15 +3,15 @@ precision highp float;
3#endif 3#endif
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec4 color; 5attribute vec4 color;
6attribute vec2 tex_coord, tex_coord2, tex_coorda; 6attribute vec2 tex_coord, tex_coord2, tex_coordm;
7uniform mat4 mvp; 7uniform mat4 mvp;
8varying vec4 col; 8varying vec4 col;
9varying vec2 tex_c, tex_cuv, tex_a; 9varying vec2 tex_c, tex_cuv, tex_m;
10void main() 10void main()
11{ 11{
12 gl_Position = mvp * vertex; 12 gl_Position = mvp * vertex;
13 col = color; 13 col = color;
14 tex_c = tex_coord; 14 tex_c = tex_coord;
15 tex_cuv = tex_coord2 * 0.5; 15 tex_cuv = tex_coord2 * 0.5;
16 tex_a = tex_coorda; 16 tex_m = tex_coordm;
17} 17}
diff --git a/src/modules/evas/engines/gl_common/shader/yuv_mask_frag.shd b/src/modules/evas/engines/gl_common/shader/yuv_mask_frag.shd
index e9e32f5c7f..3f2185aa52 100644
--- a/src/modules/evas/engines/gl_common/shader/yuv_mask_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/yuv_mask_frag.shd
@@ -5,9 +5,9 @@ precision highp float;
5precision mediump float; 5precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex, texu, texv, texa; 8uniform sampler2D tex, texu, texv, texm;
9varying vec4 col; 9varying vec4 col;
10varying vec2 tex_c, tex_c2, tex_c3, tex_a; 10varying vec2 tex_c, tex_c2, tex_c3, tex_m;
11void main() 11void main()
12{ 12{
13 float r, g, b, y, u, v; 13 float r, g, b, y, u, v;
@@ -20,6 +20,6 @@ void main()
20 r = y + (1.402 * v); 20 r = y + (1.402 * v);
21 g = y - (0.34414 * u) - (0.71414 * v); 21 g = y - (0.34414 * u) - (0.71414 * v);
22 b = y + (1.772 * u); 22 b = y + (1.772 * u);
23 gl_FragColor = vec4(r, g, b, 1.0) * texture2D(texa, tex_a.xy).a * col; 23 gl_FragColor = vec4(r, g, b, 1.0) * texture2D(texm, tex_m.xy).a * col;
24} 24}
25 25
diff --git a/src/modules/evas/engines/gl_common/shader/yuv_mask_vert.shd b/src/modules/evas/engines/gl_common/shader/yuv_mask_vert.shd
index b398515683..8a074d09df 100644
--- a/src/modules/evas/engines/gl_common/shader/yuv_mask_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/yuv_mask_vert.shd
@@ -3,10 +3,10 @@ precision highp float;
3#endif 3#endif
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec4 color; 5attribute vec4 color;
6attribute vec2 tex_coord, tex_coord2, tex_coord3, tex_coorda; 6attribute vec2 tex_coord, tex_coord2, tex_coord3, tex_coordm;
7uniform mat4 mvp; 7uniform mat4 mvp;
8varying vec4 col; 8varying vec4 col;
9varying vec2 tex_c, tex_c2, tex_c3, tex_a; 9varying vec2 tex_c, tex_c2, tex_c3, tex_m;
10void main() 10void main()
11{ 11{
12 gl_Position = mvp * vertex; 12 gl_Position = mvp * vertex;
@@ -14,5 +14,5 @@ void main()
14 tex_c = tex_coord; 14 tex_c = tex_coord;
15 tex_c2 = tex_coord2; 15 tex_c2 = tex_coord2;
16 tex_c3 = tex_coord3; 16 tex_c3 = tex_coord3;
17 tex_a = tex_coorda; 17 tex_m = tex_coordm;
18} 18}
diff --git a/src/modules/evas/engines/gl_common/shader/yuy2_mask_frag.shd b/src/modules/evas/engines/gl_common/shader/yuy2_mask_frag.shd
index 1b295b7e0b..899ac1e650 100644
--- a/src/modules/evas/engines/gl_common/shader/yuy2_mask_frag.shd
+++ b/src/modules/evas/engines/gl_common/shader/yuy2_mask_frag.shd
@@ -5,9 +5,9 @@ precision highp float;
5precision mediump float; 5precision mediump float;
6#endif 6#endif
7#endif 7#endif
8uniform sampler2D tex, texuv, texa; 8uniform sampler2D tex, texuv, texm;
9varying vec4 col; 9varying vec4 col;
10varying vec2 tex_c, tex_cuv, tex_a; 10varying vec2 tex_c, tex_cuv, tex_m;
11void main() 11void main()
12{ 12{
13 float y,u,v,vmu,r,g,b; 13 float y,u,v,vmu,r,g,b;
@@ -25,6 +25,6 @@ void main()
25 g=y-vmu; 25 g=y-vmu;
26 b=y+u; 26 b=y+u;
27 27
28 gl_FragColor = vec4(r,g,b,1.0) * texture2D(texa, tex_a.xy).a * col; 28 gl_FragColor = vec4(r,g,b,1.0) * texture2D(texm, tex_m.xy).a * col;
29} 29}
30 30
diff --git a/src/modules/evas/engines/gl_common/shader/yuy2_mask_vert.shd b/src/modules/evas/engines/gl_common/shader/yuy2_mask_vert.shd
index 7cafa143bd..c40a07e47f 100644
--- a/src/modules/evas/engines/gl_common/shader/yuy2_mask_vert.shd
+++ b/src/modules/evas/engines/gl_common/shader/yuy2_mask_vert.shd
@@ -3,15 +3,15 @@ precision highp float;
3#endif 3#endif
4attribute vec4 vertex; 4attribute vec4 vertex;
5attribute vec4 color; 5attribute vec4 color;
6attribute vec2 tex_coord, tex_coord2, tex_coorda; 6attribute vec2 tex_coord, tex_coord2, tex_coordm;
7uniform mat4 mvp; 7uniform mat4 mvp;
8varying vec4 col; 8varying vec4 col;
9varying vec2 tex_c, tex_cuv, tex_a; 9varying vec2 tex_c, tex_cuv, tex_m;
10void main() 10void main()
11{ 11{
12 gl_Position = mvp * vertex; 12 gl_Position = mvp * vertex;
13 col = color; 13 col = color;
14 tex_c = tex_coord; 14 tex_c = tex_coord;
15 tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y); 15 tex_cuv = vec2(tex_coord2.x * 0.5, tex_coord2.y);
16 tex_a = tex_coorda; 16 tex_m = tex_coordm;
17} 17}