summaryrefslogtreecommitdiff
path: root/src/opengl
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2012-10-26 22:53:56 +1100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-26 15:25:32 +0200
commit8900bc778f326e6b22ecfceb0b0b64394f3510fb (patch)
treed960ae85724f39228968bb5ee6464686bf8f5691 /src/opengl
parent5bddaf76e027a4688a9f26a6a6b3fa80e0903cb7 (diff)
downloadqtbase-8900bc778f326e6b22ecfceb0b0b64394f3510fb.tar.gz
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>
Diffstat (limited to 'src/opengl')
-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 469ac59dcf..ec2f1b02af 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -339,8 +339,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;
}