Summary:
egl images created using tbm surface for native surface set use
GL_TEXTURE_EXTERNA_OES as texture target, so we should bind to
this target when rendering. Or there is a GL_INVALID_OPERATION
error on glBindTexture in function _orig_shader_array_flush.
Thia patch follows logic of following commit;
7db0e20 evas/gl: Bind texture with external target for tbm surface
Reviewers: Hermet, raster, jsuya, herb
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12286
Change-Id: Ie0b9bb35285dbd553443ab814461bd9eb38b526e
int nomul = 0, yinvert = 0;
Eina_Bool flat = EINA_FALSE;
Eina_Bool blend = EINA_FALSE;
+ int tex_target = GL_TEXTURE_2D;
+
+ if (tex->im)
+ {
+ if (tex->im->native.target == GL_TEXTURE_EXTERNAL_OES)
+ tex_target = GL_TEXTURE_EXTERNAL_OES;
+ }
if (!(gc->dc->render_op == EVAS_RENDER_COPY) &&
((a < 255) || (tex->alpha) || (!!mtex))) blend = EINA_TRUE;
gc->pipe[pn].region.type = SHD_MAP;
gc->pipe[pn].shader.prog = prog;
gc->pipe[pn].shader.cur_tex = tex->pt->texture;
- gc->pipe[pn].shader.tex_target = GL_TEXTURE_2D;
+ gc->pipe[pn].shader.tex_target = tex_target;
if (utexture)
{