diff options
author | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2014-03-05 17:39:30 +0400 |
---|---|---|
committer | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2014-03-05 17:39:30 +0400 |
commit | 977ed4cbbf8310aa08a909f7855408601de54920 (patch) | |
tree | adaa5f7eeb143a363de1fe87b7bdf27a3d1210bb /GLESv2 | |
parent | 85bbefa3287a1023b7a654afc432b47800bea692 (diff) | |
download | emulator-yagl-977ed4cbbf8310aa08a909f7855408601de54920.tar.gz emulator-yagl-977ed4cbbf8310aa08a909f7855408601de54920.tar.bz2 emulator-yagl-977ed4cbbf8310aa08a909f7855408601de54920.zip |
YaGL: Don't call host's glGetIntegerv(GL_XXX_BITS)
GL_XXX_BITS is deprecated in OpenGL 3.1+ core, so
implement it ourselves
Change-Id: I8c44feb22350c852d9f003985d41e0bb728d00f0
Diffstat (limited to 'GLESv2')
-rw-r--r-- | GLESv2/yagl_gles3_context.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/GLESv2/yagl_gles3_context.c b/GLESv2/yagl_gles3_context.c index 524765a..9a5bcfa 100644 --- a/GLESv2/yagl_gles3_context.c +++ b/GLESv2/yagl_gles3_context.c @@ -875,7 +875,7 @@ static struct yagl_pixel_format GLenum format, GLenum type) { - uint32_t readbuffer_format_flags; + const struct yagl_gles_format_info *readbuffer_format_info; struct yagl_pixel_format *pf = yagl_gles2_context_validate_getteximage_format(ctx, readbuffer_internalformat, @@ -886,7 +886,7 @@ static struct yagl_pixel_format return pf; } - readbuffer_format_flags = yagl_gles_internalformat_flags(readbuffer_internalformat); + readbuffer_format_info = yagl_gles_internalformat_info(readbuffer_internalformat); switch (format) { case GL_RGBA: @@ -897,12 +897,12 @@ static struct yagl_pixel_format } break; case GL_RGBA_INTEGER: - if ((readbuffer_format_flags & (yagl_gles_format_unsigned_integer)) != 0) { + if ((readbuffer_format_info->flags & (yagl_gles_format_unsigned_integer)) != 0) { switch (type) { YAGL_PIXEL_FORMAT_CASE(gles3, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT); } } - if ((readbuffer_format_flags & (yagl_gles_format_signed_integer)) != 0) { + if ((readbuffer_format_info->flags & (yagl_gles_format_signed_integer)) != 0) { switch (type) { YAGL_PIXEL_FORMAT_CASE(gles3, GL_RGBA32I, GL_RGBA_INTEGER, GL_INT); } @@ -917,7 +917,7 @@ static int yagl_gles3_context_validate_copyteximage_format(struct yagl_gles_cont GLenum readbuffer_internalformat, GLenum *internalformat) { - uint32_t readbuffer_format_flags; + const struct yagl_gles_format_info *readbuffer_format_info; if (yagl_gles2_context_validate_copyteximage_format(ctx, readbuffer_internalformat, @@ -925,9 +925,9 @@ static int yagl_gles3_context_validate_copyteximage_format(struct yagl_gles_cont return 1; } - readbuffer_format_flags = yagl_gles_internalformat_flags(readbuffer_internalformat); + readbuffer_format_info = yagl_gles_internalformat_info(readbuffer_internalformat); - if ((readbuffer_format_flags & yagl_gles_format_unsigned_integer) != 0) { + if ((readbuffer_format_info->flags & yagl_gles_format_unsigned_integer) != 0) { switch (*internalformat) { case GL_R8UI: case GL_R16UI: @@ -944,7 +944,7 @@ static int yagl_gles3_context_validate_copyteximage_format(struct yagl_gles_cont case GL_RGB32UI: return 1; } - } else if ((readbuffer_format_flags & yagl_gles_format_signed_integer) != 0) { + } else if ((readbuffer_format_info->flags & yagl_gles_format_signed_integer) != 0) { switch (*internalformat) { case GL_R8I: case GL_R16I: |