From 278677f28c9514c4afd35698172956e3ecd5ca65 Mon Sep 17 00:00:00 2001 From: seungho Date: Mon, 3 May 2021 18:22:29 +0900 Subject: [PATCH] Do not use GL_MAJOR_VERSION and GL_MINOR_VERSION at the OpenGL es 2.0 device. Change-Id: Ie3c25e711c2e4de8d7c5d7f4bcd08e2c0182a573 Signed-off-by: seungho --- dali/internal/graphics/gles/gl-implementation.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dali/internal/graphics/gles/gl-implementation.h b/dali/internal/graphics/gles/gl-implementation.h index bcc8c86..4f3b8dc 100644 --- a/dali/internal/graphics/gles/gl-implementation.h +++ b/dali/internal/graphics/gles/gl-implementation.h @@ -96,10 +96,14 @@ public: { glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize); - GLint majorVersion, minorVersion; - glGetIntegerv(GL_MAJOR_VERSION, &majorVersion); - glGetIntegerv(GL_MINOR_VERSION, &minorVersion); - mGlesVersion = majorVersion * 10 + minorVersion; + // Only change gles version for the device that support above gles 3.0. + if(mGlesVersion >= INITIAL_GLES_VERSION) + { + GLint majorVersion, minorVersion; + glGetIntegerv(GL_MAJOR_VERSION, &majorVersion); + glGetIntegerv(GL_MINOR_VERSION, &minorVersion); + mGlesVersion = majorVersion * 10 + minorVersion; + } if(mGlesVersion >= GLES_VERSION_SUPPORT_BLEND_EQUATION_ADVANCED) { -- 2.7.4