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>bb10
parent
5bddaf76e0
commit
8900bc778f
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue