summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_texture.c
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2015-05-11 20:07:12 +0900
committerJi-Youn Park <jy0703.park@samsung.com>2015-05-11 20:07:12 +0900
commit4a4d5f27053944bd1da8a65e36d3ab0c073ab8cc (patch)
tree52a32d933cdd6c0cad865274eba176f398f82d43 /src/modules/evas/engines/gl_common/evas_gl_texture.c
parent3d8c0794b8cc618811e93744c805adf14ea0b674 (diff)
evas: fix bug in evas gl texture.
Summary: bytecount always 1,2,4. so changed for simple code.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c10
1 files changed, 2 insertions, 8 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 e71b8e4707..c92a37442c 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -1047,10 +1047,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int
1047 { 1047 {
1048 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); 1048 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
1049 } 1049 }
1050 if ((bytes_count == 1) || (bytes_count == 2)) 1050 glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
1051 glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
1052 else
1053 glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
1054 1051
1055// printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h); 1052// printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h);
1056 // +-+ 1053 // +-+
@@ -1373,10 +1370,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
1373 { 1370 {
1374 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); 1371 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
1375 } 1372 }
1376 if ((bytes_count == 1) || (bytes_count == 2)) 1373 glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
1377 glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
1378 else
1379 glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
1380 1374
1381 _tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out); 1375 _tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out);
1382 1376