}
void
-evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc,
- Evas_GL_Texture *tex,
- Evas_GL_Texture *texm,
- double sx, double sy, double sw, double sh,
- double sxm, double sym, double swm,double shm,
- int x, int y, int w, int h,
- int r, int g, int b, int a,
- Eina_Bool smooth)
-{
- int pnum, nv, nc, nu, nm, i;
- GLfloat tx1, tx2, ty1, ty2;
- GLfloat txm1, txm2, tym1, tym2;
- Eina_Bool blend = 1;
- GLuint prog = gc->shared->shader[SHADER_IMG_MASK].prog;
- int pn = 0;
-
-#if 0
- if (tex->gc->shared->info.bgra)
- {
- prog = gc->shared->shader[SHADER_IMG_MASK].prog;
- }
- else
- {
-#warning Nash: FIXME: Need two shaders?
- printf("Not good: Need other texture\n");
- prog = gc->shared->shader[SHADER_IMG].prog;
- }
-#endif
-
- pn = _evas_gl_common_context_push(RTYPE_IMASK,
- gc, tex, texm,
- prog,
- x, y, w, h,
- blend,
- smooth,
- 0, 0, 0, 0, 0);
-
- gc->pipe[pn].region.type = RTYPE_IMASK;
- gc->pipe[pn].shader.cur_tex = tex->pt->texture;
- gc->pipe[pn].shader.cur_texm = texm->pt->texture;
- gc->pipe[pn].shader.cur_prog = prog;
- gc->pipe[pn].shader.smooth = smooth;
- gc->pipe[pn].shader.blend = blend;
- gc->pipe[pn].shader.render_op = gc->dc->render_op;
- gc->pipe[pn].shader.clip = 0;
- gc->pipe[pn].shader.cx = 0;
- gc->pipe[pn].shader.cy = 0;
- gc->pipe[pn].shader.cw = 0;
- gc->pipe[pn].shader.ch = 0;
- gc->pipe[pn].array.line = 0;
- gc->pipe[pn].array.use_vertex = 1;
- // if nomul... dont need this
- gc->pipe[pn].array.use_color = 1;
- gc->pipe[pn].array.use_texuv = 1;
- gc->pipe[pn].array.use_texuv2 = 0;
- gc->pipe[pn].array.use_texuv3 = 0;
- gc->pipe[pn].array.use_texm = 1;
- gc->pipe[pn].array.use_texsam = 0;
-
- pipe_region_expand(gc, pn, x, y, w, h);
-
- pnum = gc->pipe[pn].array.num;
- nv = pnum * 3; nc = pnum * 4; nm = pnum * 2; nu = pnum * 2;
- gc->pipe[pn].array.num += 6;
- array_alloc(gc, pn);
-
- if ((tex->im) && (tex->im->native.data) && (!tex->im->native.yinvert))
- {
- tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w;
- ty1 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h;
- tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w;
- ty2 = ((double)(tex->y) + sy) / (double)tex->pt->h;
-
- txm1 = ((double)(texm->x) + sxm) / (double)texm->pt->w;
- tym1 = ((double)(texm->y) + sym + shm) / (double)texm->pt->h;
- txm2 = ((double)(texm->x) + sxm + swm) / (double)texm->pt->w;
- tym2 = ((double)(texm->y) + sym) / (double)texm->pt->h;
- }
- else
- {
- tx1 = ((double)(tex->x) + sx) / (double)tex->pt->w;
- ty1 = ((double)(tex->y) + sy) / (double)tex->pt->h;
- tx2 = ((double)(tex->x) + sx + sw) / (double)tex->pt->w;
- ty2 = ((double)(tex->y) + sy + sh) / (double)tex->pt->h;
-
- txm1 = (texm->x + sxm) / (double)texm->pt->w;
- tym1 = (texm->y + sym) / (double)texm->pt->h;
- txm2 = (texm->x + sxm + swm) / (double)texm->pt->w;
- tym2 = (texm->y + sym + shm) / (double)texm->pt->h;
- }
- // printf(" %3.6lf %3.6lf %3.6lf %3.6lf\n",sx,sy,sw,sh);
- // printf("m%3.6lf %3.6lf %3.6lf %3.6lf\n",sxm,sym,swm,shm);
- // printf(" %3f %3f %3f %3f\n",tx1,ty1,tx2,ty2);
- // printf("m%3f %3f %3f %3f\n",txm1,tym1,txm2,tym2);
-
- PUSH_VERTEX(pn, x , y , 0);
- PUSH_VERTEX(pn, x + w, y , 0);
- PUSH_VERTEX(pn, x , y + h, 0);
-
- PUSH_TEXUV(pn, tx1, ty1);
- PUSH_TEXUV(pn, tx2, ty1);
- PUSH_TEXUV(pn, tx1, ty2);
-
- PUSH_TEXM(pn, txm1, tym1);
- PUSH_TEXM(pn, txm2, tym1);
- PUSH_TEXM(pn, txm1, tym2);
-
- PUSH_VERTEX(pn, x + w, y , 0);
- PUSH_VERTEX(pn, x + w, y + h, 0);
- PUSH_VERTEX(pn, x , y + h, 0);
-
- PUSH_TEXUV(pn, tx2, ty1);
- PUSH_TEXUV(pn, tx2, ty2);
- PUSH_TEXUV(pn, tx1, ty2);
-
- PUSH_TEXM(pn, txm2, tym1);
- PUSH_TEXM(pn, txm2, tym2);
- PUSH_TEXM(pn, txm1, tym2);
-
- // if nomul... dont need this
- for (i = 0; i < 6; i++)
- {
- PUSH_COLOR(pn, r, g, b, a);
- }
-}
-
-
-void
evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
Evas_GL_Texture *tex,
double sx, double sy, double sw, double sh,