Evas gl: Fix colors when using ETC1 textures

We need to use the RGBA shader to invert R and B otherwise
those will be inverted on the screen.
This commit is contained in:
Jean-Philippe Andre 2014-04-03 19:18:52 +09:00
parent b439b8c9be
commit ecb8ce8748
1 changed files with 4 additions and 4 deletions

View File

@ -1637,7 +1637,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
} }
else if (tex_only) else if (tex_only)
{ {
if (tex->pt->dyn.img) if (tex->pt->dyn.img && (tex->pt->format != GL_ETC1_RGB8_OES))
{ {
if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2)))) if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
{ {
@ -1708,7 +1708,7 @@ evas_gl_common_context_image_push(Evas_Engine_GL_Context *gc,
} }
else else
{ {
if (tex->gc->shared->info.bgra) if (tex->gc->shared->info.bgra && (tex->pt->format != GL_ETC1_RGB8_OES))
{ {
if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2)))) if ((smooth) && ((sw >= (w * 2)) && (sh >= (h * 2))))
{ {
@ -2448,7 +2448,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
default: default:
if (tex_only) if (tex_only)
{ {
if (tex->pt->dyn.img) if (tex->pt->dyn.img && (tex->pt->format != GL_ETC1_RGB8_OES))
{ {
prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a,
SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog; SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA)].prog;
@ -2461,7 +2461,7 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
} }
else else
{ {
if (tex->gc->shared->info.bgra) if (tex->gc->shared->info.bgra && (tex->pt->format != GL_ETC1_RGB8_OES))
{ {
prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a, prog = gc->shared->shader[evas_gl_common_shader_choice(npoints, p, r, g, b, a,
SHADER_IMG_BGRA_NOMUL, SHADER_IMG_BGRA_NOMUL,