From 6d118254147f634acc06b54fef7fe116f658c7bf Mon Sep 17 00:00:00 2001 From: DaeKwang Ryu Date: Tue, 20 Dec 2016 20:04:31 +0900 Subject: [PATCH] [EvasGL] wrap glGetString. support up to GLES 3.1 EvasGL supports up to GLES 3.1 Change-Id: I518aa0373bfa00427c447e5db12bc02743d4c759 --- src/modules/evas/engines/gl_common/evas_gl_api.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c b/src/modules/evas/engines/gl_common/evas_gl_api.c index 84562e2..7be99e6 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_api.c +++ b/src/modules/evas/engines/gl_common/evas_gl_api.c @@ -1369,11 +1369,9 @@ _evgl_glGetString(GLenum name) ret = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION); if (!ret) return NULL; #ifdef GL_GLES - if (ret[18] != '1') + if ((ret[18] == '3') && (ret[20] == '2')) { - // We try not to remove the vendor fluff - snprintf(_glsl, sizeof(_glsl), "OpenGL ES GLSL ES 1.00 Evas GL (%s)", ret + 18); - _glsl[sizeof(_glsl) - 1] = '\0'; + snprintf(_glsl, sizeof(_glsl), "OpenGL ES GLSL ES 3.10"); return (const GLubyte *) _glsl; } return (const GLubyte *) ret; @@ -1388,6 +1386,11 @@ _evgl_glGetString(GLenum name) ret = (const char *) glGetString(GL_VERSION); if (!ret) return NULL; #ifdef GL_GLES + if ((ret[10] == '3') && (ret[12] == '2')) + { + snprintf(_version, sizeof(_version), "OpenGL ES 3.1"); + return (const GLubyte *) _version; + } if ((ret[10] != '2') && (ret[10] != '3')) { // We try not to remove the vendor fluff -- 2.7.4