forked from enlightenment/efl
evas: fix bug in evas gl texture.
Summary: bytecount always 1,2,4. so changed for simple code.
This commit is contained in:
parent
3d8c0794b8
commit
4a4d5f2705
|
@ -1047,10 +1047,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int
|
||||||
{
|
{
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||||
}
|
}
|
||||||
if ((bytes_count == 1) || (bytes_count == 2))
|
glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
|
|
||||||
else
|
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
|
||||||
|
|
||||||
// printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h);
|
// printf("tex upload %ix%i\n", im->cache_entry.w, im->cache_entry.h);
|
||||||
// +-+
|
// +-+
|
||||||
|
@ -1373,10 +1370,7 @@ evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im)
|
||||||
{
|
{
|
||||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||||
}
|
}
|
||||||
if ((bytes_count == 1) || (bytes_count == 2))
|
glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, bytes_count);
|
|
||||||
else
|
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
|
||||||
|
|
||||||
_tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out);
|
_tex_sub_2d(tex->gc, u, tex->ty, EVAS_GL_TILE_SIZE, EVAS_GL_TILE_SIZE, fmt, tex->ptt->dataformat, out);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue