-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intercept GL_VERSION string request in Evas GL #289
Intercept GL_VERSION string request in Evas GL #289
Conversation
* Evas GL's glGetString doesn't handle GL_VERSION string request. So it intercepts this request and always returns the 2.1 version string. * Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2. Signed-off-by: Boram Bae <boram21.bae@samsung.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In tizen's efl, glGetString(GL_VERSION) does not work properly.
(https://review.tizen.org/gerrit/#/c/platform/upstream/efl/+/178697/)
(You will need a review.tizen.org ID to view this link.)
commit efb1d367be87977c584f50764de3e3f233a720f2
Author: Daekwang Ryu <dkdk.ryu@samsung.com>
Date: Fri May 11 18:51:59 2018 +0900
evas_gl: remove GL_VERSION wrapper
because some drivers return a context of later version not specified version.
Change-Id: I4fc4567ccdefd63f422812d1f7461d13e1e547b3
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 84bd943076..6c3a44a731 100755
--- a/src/modules/evas/engines/gl_common/evas_gl_api.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api.c
@@ -1471,7 +1471,7 @@ _evgl_glGetString(GLenum name)
{
static char _version[128] = {0};
static char _glsl[128] = {0};
- const char *ret, *version_extra;
+ const char *ret;
EVGL_Resource *rsc;
EVGL_Context *ctx;
@@ -1521,19 +1521,6 @@ _evgl_glGetString(GLenum name)
return (const GLubyte *) _glsl;
#endif
- case GL_VERSION:
- ret = (const char *) EVGL_TH(glGetString, GL_VERSION);
- if (!ret) return NULL;
-#ifdef GL_GLES
- version_extra = ret + 10;
-#else
- version_extra = ret;
-#endif
- snprintf(_version, sizeof(_version), "OpenGL ES %d.%d Evas GL (%s)",
- (int) ctx->version, ctx->version_minor, version_extra);
- _version[sizeof(_version) - 1] = '\0';
- return (const GLubyte *) _version;
-
case GL_EXTENSIONS:
// Passing the version - GLESv2/GLESv3.
return (GLubyte *) evgl_api_ext_string_get(EINA_TRUE, rsc->current_ctx->version);
That's why I think CustomGlGetString is appropriate.
Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@JSUYA Please make sure to clean up the commit message before you merge a PR.
This kind of thing should not be included in the final commit message. |
OK I will be careful |
* Evas GL's glGetString doesn't handle GL_VERSION string request. So it intercepts this request and always returns the 2.1 version string. * Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2. Signed-off-by: Boram Bae <boram21.bae@samsung.com>
* Evas GL's glGetString doesn't handle GL_VERSION string request. So it intercepts this request and always returns the 2.1 version string. * Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2. Signed-off-by: Boram Bae <boram21.bae@samsung.com>
So it intercepts this request and always returns the 2.1 version string.
Signed-off-by: Boram Bae boram21.bae@samsung.com