summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2015-05-13 14:41:44 +0900
committerJi-Youn Park <jy0703.park@samsung.com>2015-05-13 14:50:30 +0900
commit295edfcfb76ca950a2b2731736d919ea4822df9d (patch)
tree7ab8eb837e4e276280253b7509d60d10b0849d78
parent843ac659812bb51a328990a4d83dd925e2a5151f (diff)
downloadefl-295edfcfb76ca950a2b2731736d919ea4822df9d.tar.gz
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 <jy0703.park@samsung.com>
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c4
1 files 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 41d3236943..2046f2e762 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);