From: Stanislav Vorobiov Date: Mon, 12 Aug 2013 12:01:49 +0000 (+0400) Subject: YaGL: GL_EXT_texture_format_BGRA8888 implementation bug fixed X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~804^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1c09b991994961ae60a2049d2272f527d8b8fd6;p=sdk%2Femulator%2Fqemu.git YaGL: GL_EXT_texture_format_BGRA8888 implementation bug fixed GL_BGRA is a valid value for format, but not for internalformat, fixed it --- diff --git a/hw/yagl_apis/gles/yagl_host_gles_calls.c b/hw/yagl_apis/gles/yagl_host_gles_calls.c index 21f9b7ae42..2c0add5728 100644 --- a/hw/yagl_apis/gles/yagl_host_gles_calls.c +++ b/hw/yagl_apis/gles/yagl_host_gles_calls.c @@ -61,6 +61,16 @@ static GLenum yagl_get_actual_type(GLenum type) } } +static GLint yagl_get_actual_internalformat(GLint internalformat) +{ + switch (internalformat) { + case GL_BGRA: + return GL_RGBA; + default: + return internalformat; + } +} + static GLint yagl_get_stride(struct yagl_gles_context *ctx, GLuint alignment_type, GLsizei width, @@ -1500,6 +1510,7 @@ bool yagl_host_glTexImage2D(GLenum target, GLvoid *pixels = NULL; GLsizei stride = 0; GLenum actual_type = yagl_get_actual_type(type); + GLint actual_internalformat = yagl_get_actual_internalformat(internalformat); YAGL_GET_CTX(glTexImage2D); @@ -1545,7 +1556,7 @@ bool yagl_host_glTexImage2D(GLenum target, ctx->driver->TexImage2D(target, level, - internalformat, + actual_internalformat, width, height, border,