1. dyn.target need to change GL_TEXTURE_2D. if this value set GL_TEXTURE_EXTERNAL_OES, it has some issue.
2. we don't need evas_gl_common_texture_shared_specific & evas_gl_common_texture_shared_back.
because these api for dyn.img change case.
Change-Id: Ieec1edc9a454278f001bd18c1f5cbf0c490e0c71
Evas_GL_Polygon *evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly);
void evas_gl_common_poly_draw(Evas_Engine_GL_Context *gc, Evas_GL_Polygon *poly, int x, int y);
-void evas_gl_common_texture_shared_specific(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt, int i);
-void evas_gl_common_texture_shared_back(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt);
-
void evas_gl_common_line_draw(Evas_Engine_GL_Context *gc, int x1, int y1, int x2, int y2);
extern void (*glsym_glGenFramebuffers) (GLsizei a, GLuint *b);
glUseProgram(gc->state.current.prog->prog);
glActiveTexture(GL_TEXTURE0);
- evas_gl_common_texture_shared_back(gc, NULL);
+ glBindTexture(gc->pipe[0].shader.tex_target, gc->pipe[0].shader.cur_tex);
_evas_gl_common_viewport_set(gc,1);
}
}
#endif
glActiveTexture(GL_TEXTURE0);
- evas_gl_common_texture_shared_specific(gc, NULL, i);
+ glBindTexture(gc->pipe[i].shader.tex_target, gc->pipe[i].shader.cur_tex);
}
if (gc->pipe[i].array.im)
{
return -1;
}
-void
-evas_gl_common_texture_shared_specific(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt, int i)
-{
- if (!pt || pt->texture != gc->pipe[i].shader.cur_tex)
- {
- if (gc->pipe[i].array.im)
- {
- if (gc->pipe[i].array.im->tex->pt->dyn.img)
- gc->pipe[i].shader.tex_target = gc->pipe[i].array.im->tex->pt->dyn.target;
- else
- gc->pipe[i].shader.tex_target = gc->pipe[i].array.im->native.target;
- }
- else
- gc->pipe[i].shader.tex_target = GL_TEXTURE_2D;
-
- glBindTexture(gc->pipe[i].shader.tex_target, gc->pipe[i].shader.cur_tex);
- }
-}
-
-void
-evas_gl_common_texture_shared_back(Evas_Engine_GL_Context *gc, Evas_GL_Texture_Pool *pt)
-{
- evas_gl_common_texture_shared_specific(gc, pt, 0);
-}
-
static void
_print_tex_count(void)
{
_print_tex_count();
- if (gc->shared->info.sec_tbm_surface)
- pt->dyn.target = GL_TEXTURE_EXTERNAL_OES;
- else
- pt->dyn.target = GL_TEXTURE_2D;
+ pt->dyn.target = GL_TEXTURE_2D;
glGenTextures(1, &(pt->texture));
glBindTexture(pt->dyn.target, pt->texture);