diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-19 19:15:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-19 19:15:46 +0300 |
commit | 45561c45f374cf8511b755da74c1786be6a3f85c (patch) | |
tree | b992c2881521434812920a5b88ef2b14b6eed6a4 /src | |
parent | 55abd8d24149ddb41b12589422ce3f1b8043756e (diff) | |
download | manaplus-1.5.12.19.tar.gz manaplus-1.5.12.19.tar.bz2 manaplus-1.5.12.19.tar.xz manaplus-1.5.12.19.zip |
Fix OpenGL rederers in Android.v1.5.12.19
Diffstat (limited to 'src')
-rw-r--r-- | src/graphicsmanager.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index e4949fbaf..d04588456 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -540,7 +540,7 @@ void GraphicsManager::initGraphics() openGLMode = RENDER_NORMAL_OPENGL; } } - if (openGLMode == RENDER_NORMAL_OPENGL || openGLMode == RENDER_GLES_OPENGL) + if (openGLMode == RENDER_NORMAL_OPENGL) { if (!checkGLVersion(2, 0)) { @@ -548,6 +548,14 @@ void GraphicsManager::initGraphics() openGLMode = RENDER_SAFE_OPENGL; } } + if (openGLMode == RENDER_GLES_OPENGL) + { + if (!checkGLVersion(2, 0) && !checkGLesVersion(1, 0)) + { + logger->log("Fallback to safe OpenGL mode"); + openGLMode = RENDER_SAFE_OPENGL; + } + } if (openGLMode == RENDER_GLES2_OPENGL) { // +++ here need check also not implimented gles flag @@ -858,6 +866,15 @@ void GraphicsManager::setGLVersion() cutFirst(version, "OpenGL ES "); sscanf(version.c_str(), "%5d.%5d", &mSLMajor, &mSLMinor); logger->log("Detected glsl version: %d.%d", mSLMajor, mSLMinor); +#ifdef ANDROID + if (!mMajor && !mMinor) + { + logger->log("Overriding detected OpenGL version on Android to 1.0"); + mGles = true; + mMajor = 1; + mMinor = 0; + } +#endif } void GraphicsManager::logVersion() const |