From 295edfcfb76ca950a2b2731736d919ea4822df9d Mon Sep 17 00:00:00 2001 From: Ji-Youn Park Date: Wed, 13 May 2015 14:41:44 +0900 Subject: [PATCH] Evas GL: fix bug related with alignment if pixel size is not 32 bit, alignment have to be changed. Change-Id: I6258637dd859c8de8162542e8f95c85052c623d5 Signed-off-by: Jiyoun Park --- src/modules/evas/engines/gl_common/evas_gl_texture.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c index 41d3236..2046f2e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -1031,7 +1031,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); } - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); // printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h); @@ -1328,7 +1328,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im) glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); } - glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count); GLERR(__FUNCTION__, __FILE__, __LINE__, ""); _tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out); -- 2.7.4