diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-06-29 10:09:37 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-06-29 12:12:49 (GMT) |
commit | 9dd82fcebc50ca802e9e24a50283152e1dc35508 (patch) | |
tree | ff3a62bf1d1bc078fdf617da5d460790c81becf8 /src/opengl/qpixmapdata_gl.cpp | |
parent | b14a08fd363defbff255b31b8d5482959dc53b4d (diff) | |
download | Qt-9dd82fcebc50ca802e9e24a50283152e1dc35508.zip Qt-9dd82fcebc50ca802e9e24a50283152e1dc35508.tar.gz Qt-9dd82fcebc50ca802e9e24a50283152e1dc35508.tar.bz2 |
Fixed some regressions in the OpenGL pixmap backend.
Make sure a QPixmap gets an alpha channel when filled with a non-opaque
color, and fix issues where shader manager did not active correct shader
program.
Reviewed-by: Tom
Diffstat (limited to 'src/opengl/qpixmapdata_gl.cpp')
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 8a2187c..f0c7e20 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -254,8 +254,15 @@ void QGLPixmapData::fill(const QColor &color) if (!isValid()) return; - if (!m_textureId) + bool hasAlpha = color.alpha() != 255; + if (hasAlpha && !m_hasAlpha) { + if (m_textureId) { + glDeleteTextures(1, &m_textureId); + m_textureId = 0; + m_dirty = true; + } m_hasAlpha = color.alpha() != 255; + } if (useFramebufferObjects()) { m_source = QImage(); |