forked from enlightenment/efl
parent
df079ad4da
commit
82a183ffde
|
@ -713,7 +713,7 @@ evas_gl_common_context_new(void)
|
|||
glEnableVertexAttribArray(SHAD_COLOR);
|
||||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
|
||||
if (!evas_gl_common_shader_program_init(shared)) goto error;
|
||||
if (!evas_gl_common_shader_program_init(shared)) goto error;
|
||||
|
||||
#define SHADER_TEXTURE_ADD(Shared, Shader, Name) \
|
||||
glUseProgram(Shared->shader[SHADER_##Shader].prog); \
|
||||
|
@ -1148,10 +1148,10 @@ vertex_array_size_check(Evas_Engine_GL_Context *gc, int pn, int n)
|
|||
|
||||
static inline Evas_GL_Shader
|
||||
evas_gl_common_shader_choice(int npoints __UNUSED__,
|
||||
RGBA_Map_Point *p,
|
||||
int r, int g, int b, int a,
|
||||
Evas_GL_Shader nomul,
|
||||
Evas_GL_Shader mul)
|
||||
RGBA_Map_Point *p,
|
||||
int r, int g, int b, int a,
|
||||
Evas_GL_Shader nomul,
|
||||
Evas_GL_Shader mul)
|
||||
{
|
||||
if ((a == 255) && (r == 255) && (g == 255) && (b == 255))
|
||||
{
|
||||
|
@ -1218,8 +1218,8 @@ _evas_gl_common_context_push(int rtype,
|
|||
shader_array_flush(gc);
|
||||
goto again;
|
||||
}
|
||||
gc->state.top_pipe = pn;
|
||||
}
|
||||
gc->state.top_pipe = pn;
|
||||
}
|
||||
}
|
||||
if ((tex) && (((tex->im) && (tex->im->native.data)) || tex->pt->dyn.img))
|
||||
{
|
||||
|
@ -1328,17 +1328,17 @@ evas_gl_common_context_rectangle_push(Evas_Engine_GL_Context *gc,
|
|||
|
||||
if (gc->dc->mask.mask)
|
||||
{
|
||||
RGBA_Draw_Context *dc;
|
||||
dc = gc->dc;
|
||||
Evas_GL_Image *im;
|
||||
im = (void *)dc->mask.mask;
|
||||
evas_gl_common_context_font_push(gc, im->tex,
|
||||
RGBA_Draw_Context *dc;
|
||||
dc = gc->dc;
|
||||
Evas_GL_Image *im;
|
||||
im = (void *)dc->mask.mask;
|
||||
evas_gl_common_context_font_push(gc, im->tex,
|
||||
x - dc->mask.x,
|
||||
y - dc->mask.y,
|
||||
dc->mask.w, dc->mask.h,
|
||||
x, y, w, h,
|
||||
r, g, b, a);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (a < 255) blend = 1;
|
||||
|
@ -1660,7 +1660,7 @@ evas_gl_common_context_image_mask_push(Evas_Engine_GL_Context *gc,
|
|||
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;
|
||||
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;
|
||||
|
@ -1727,12 +1727,12 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
|
|||
int pn = 0;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_FONT,
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
1,
|
||||
0,
|
||||
0, 0, 0, 0, 0);
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
1,
|
||||
0,
|
||||
0, 0, 0, 0, 0);
|
||||
|
||||
gc->pipe[pn].region.type = RTYPE_FONT;
|
||||
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
|
||||
|
@ -1816,12 +1816,12 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_YUV_NOMUL, SHADER_YUV)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_YUV,
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
smooth,
|
||||
0, 0, 0, 0, 0);
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
smooth,
|
||||
0, 0, 0, 0, 0);
|
||||
|
||||
gc->pipe[pn].region.type = RTYPE_YUV;
|
||||
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
|
||||
|
@ -1901,11 +1901,11 @@ evas_gl_common_context_yuv_push(Evas_Engine_GL_Context *gc,
|
|||
|
||||
void
|
||||
evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
|
||||
Evas_GL_Texture *tex,
|
||||
double sx, double sy, double sw, double sh,
|
||||
int x, int y, int w, int h,
|
||||
int r, int g, int b, int a,
|
||||
Eina_Bool smooth)
|
||||
Evas_GL_Texture *tex,
|
||||
double sx, double sy, double sw, double sh,
|
||||
int x, int y, int w, int h,
|
||||
int r, int g, int b, int a,
|
||||
Eina_Bool smooth)
|
||||
{
|
||||
int pnum, nv, nc, nu, nu2, nu3, nt, i;
|
||||
GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
|
||||
|
@ -1919,12 +1919,12 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_YUY2_NOMUL, SHADER_YUY2)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_YUY2,
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
smooth,
|
||||
0, 0, 0, 0, 0);
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
smooth,
|
||||
0, 0, 0, 0, 0);
|
||||
|
||||
gc->pipe[pn].region.type = RTYPE_YUY2;
|
||||
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
|
||||
|
@ -1995,11 +1995,11 @@ evas_gl_common_context_yuy2_push(Evas_Engine_GL_Context *gc,
|
|||
|
||||
void
|
||||
evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
|
||||
Evas_GL_Texture *tex,
|
||||
double sx, double sy, double sw, double sh,
|
||||
int x, int y, int w, int h,
|
||||
int r, int g, int b, int a,
|
||||
Eina_Bool smooth)
|
||||
Evas_GL_Texture *tex,
|
||||
double sx, double sy, double sw, double sh,
|
||||
int x, int y, int w, int h,
|
||||
int r, int g, int b, int a,
|
||||
Eina_Bool smooth)
|
||||
{
|
||||
int pnum, nv, nc, nu, nu2, nu3, nt, i;
|
||||
GLfloat tx1, tx2, ty1, ty2, t2x1, t2x2, t2y1, t2y2;
|
||||
|
@ -2013,12 +2013,12 @@ evas_gl_common_context_nv12_push(Evas_Engine_GL_Context *gc,
|
|||
SHADER_NV12_NOMUL, SHADER_NV12)].prog;
|
||||
|
||||
pn = _evas_gl_common_context_push(RTYPE_NV12,
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
smooth,
|
||||
0, 0, 0, 0, 0);
|
||||
gc, tex, NULL,
|
||||
prog,
|
||||
x, y, w, h,
|
||||
blend,
|
||||
smooth,
|
||||
0, 0, 0, 0, 0);
|
||||
|
||||
gc->pipe[pn].region.type = RTYPE_NV12;
|
||||
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
|
||||
|
@ -2686,11 +2686,11 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
|||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisableVertexAttribArray(SHAD_TEXM);
|
||||
}
|
||||
}
|
||||
if ((gc->pipe[i].array.use_texuv2) && (gc->pipe[i].array.use_texuv3))
|
||||
{
|
||||
glEnableVertexAttribArray(SHAD_TEXUV2);
|
||||
|
@ -2708,7 +2708,7 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
|||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
#ifdef GL_GLES
|
||||
if (gc->pipe[i].shader.cur_texu_dyn)
|
||||
secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn);
|
||||
secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn);
|
||||
#endif
|
||||
|
||||
glActiveTexture(GL_TEXTURE2);
|
||||
|
@ -2716,8 +2716,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
|||
glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv);
|
||||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
#ifdef GL_GLES
|
||||
if (gc->pipe[i].shader.cur_texv_dyn)
|
||||
secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv_dyn);
|
||||
if (gc->pipe[i].shader.cur_texv_dyn)
|
||||
secsym_glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texv_dyn);
|
||||
#endif
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
|
@ -2734,8 +2734,8 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
|
|||
glBindTexture(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu);
|
||||
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
|
||||
#ifdef GL_GLES
|
||||
if (gc->pipe[i].shader.cur_texu_dyn)
|
||||
secsym_glEGLImageTargetTexture2DOES
|
||||
if (gc->pipe[i].shader.cur_texu_dyn)
|
||||
secsym_glEGLImageTargetTexture2DOES
|
||||
(GL_TEXTURE_2D, gc->pipe[i].shader.cur_texu_dyn);
|
||||
#endif
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
|
|
Loading…
Reference in New Issue