summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-07-01 11:05:26 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-07-01 11:05:26 +0200
commit0aa2d318b1524cdab42ab9988270779ddcc1922a (patch)
tree695c70702763ba2c66eb398ae9d545fc712a9e2d /src/gui/opengl
parent6251d4dafc86bcbec09d1962050af9924249d419 (diff)
parent49049d90470eb3e94bda77d19ab7f7c57a0bd57f (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 2579f0e77f..2b8488ab0e 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -289,8 +289,12 @@ static int qt_gl_resolve_features()
if (extensions.match("GL_OES_texture_npot"))
features |= QOpenGLFunctions::NPOTTextures |
QOpenGLFunctions::NPOTTextureRepeat;
- if (ctx->format().majorVersion() >= 3 || extensions.match("GL_EXT_texture_rg"))
- features |= QOpenGLFunctions::TextureRGFormats;
+ if (ctx->format().majorVersion() >= 3 || extensions.match("GL_EXT_texture_rg")) {
+ // Mesa's GLES implementation (as of 10.6.0) is unable to handle this, even though it provides 3.0.
+ const char *renderer = reinterpret_cast<const char *>(ctx->functions()->glGetString(GL_RENDERER));
+ if (!(renderer && strstr(renderer, "Mesa")))
+ features |= QOpenGLFunctions::TextureRGFormats;
+ }
return features;
} else {
// OpenGL
@@ -3221,7 +3225,11 @@ bool QOpenGLES3Helper::init()
m_gl.setFileName(QStringLiteral("libGLESv2d"));
# endif
# else
+# ifdef Q_OS_ANDROID
m_gl.setFileName(QStringLiteral("GLESv2"));
+# else
+ m_gl.setFileNameAndVersion(QStringLiteral("GLESv2"), 2);
+# endif
# endif // Q_OS_WIN
return m_gl.load();
#else