summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2012-10-26 11:53:56 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-30 09:28:52 (GMT)
commitc16471dd7aa6ce9b9768e70de66763f73584d880 (patch)
tree6ca638e47df8c7ae8ea6b9316c1753c757209dfc
parent292bfacd4f4420ba47b6aa0bd1d0686e02711845 (diff)
downloadQt-c16471dd7aa6ce9b9768e70de66763f73584d880.zip
Qt-c16471dd7aa6ce9b9768e70de66763f73584d880.tar.gz
Qt-c16471dd7aa6ce9b9768e70de66763f73584d880.tar.bz2
QGLTextureGlyphCache: Fix text rendering artifacts on NVIDIA
Check GL_VENDOR to test whether using NVIDIA graphics. On Linux, GL_VERSION and GL_VENDOR contains "NVIDIA". On Windows, only GL_VENDOR contains "NVIDIA". Task-number: QTBUG-27658 Change-Id: I5e74d07ecb9522d1a86ac2953415a51bbdbe8c49 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from qtbase/8900bc778f326e6b22ecfceb0b0b64394f3510fb)
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index abf7b8d..4a01057 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -341,8 +341,8 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed sub
if (!ctx->d_ptr->workaround_brokenAlphaTexSubImage_init) {
// don't know which driver versions exhibit this bug, so be conservative for now
- const QByteArray versionString(reinterpret_cast<const char*>(glGetString(GL_VERSION)));
- ctx->d_ptr->workaround_brokenAlphaTexSubImage = versionString.indexOf("NVIDIA") >= 0;
+ const QByteArray vendorString(reinterpret_cast<const char*>(glGetString(GL_VENDOR)));
+ ctx->d_ptr->workaround_brokenAlphaTexSubImage = vendorString.indexOf("NVIDIA") >= 0;
ctx->d_ptr->workaround_brokenAlphaTexSubImage_init = true;
}