summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp19
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