From 8900bc778f326e6b22ecfceb0b0b64394f3510fb Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Fri, 26 Oct 2012 22:53:56 +1100 Subject: QGLTextureGlyphCache: Fix text rendering artifacts on NVIDIA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(glGetString(GL_VERSION))); - ctx->d_ptr->workaround_brokenAlphaTexSubImage = versionString.indexOf("NVIDIA") >= 0; + const QByteArray vendorString(reinterpret_cast(glGetString(GL_VENDOR))); + ctx->d_ptr->workaround_brokenAlphaTexSubImage = vendorString.indexOf("NVIDIA") >= 0; ctx->d_ptr->workaround_brokenAlphaTexSubImage_init = true; } -- cgit v1.2.3