diff options
author | Trond Kjernaasen <trond@trolltech.com> | 2010-05-11 14:34:14 (GMT) |
---|---|---|
committer | Trond Kjernaasen <trond@trolltech.com> | 2010-05-11 14:44:12 (GMT) |
commit | d8b693310ef268c4f58bd2e04b7613460b76bac3 (patch) | |
tree | 1412f3aa0664218dd04bad3c8745465cadd200eb /src/opengl | |
parent | 4d36724867d77f3c8bf31b084ef8beae3a9646b3 (diff) | |
download | Qt-d8b693310ef268c4f58bd2e04b7613460b76bac3.zip Qt-d8b693310ef268c4f58bd2e04b7613460b76bac3.tar.gz Qt-d8b693310ef268c4f58bd2e04b7613460b76bac3.tar.bz2 |
Fixed QGLPixmapDropShadowFilter on Nvidia hardware.
There seems to be a driver bug that causes glTexSubImage2D() to not
align data correctly when uploading a GL_ALPHA texture.
Task-number: related to QTBUG-10510
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qglpixmapfilter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index d5a11d9..bfa5ef1 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -591,10 +591,11 @@ bool QGLPixmapDropShadowFilter::processGL(QPainter *painter, const QPointF &pos, qt_blurImage(image, r * qreal(0.5), false, 1); - GLuint texture = generateBlurTexture(image.size(), GL_ALPHA); - - glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, image.width(), image.height(), GL_ALPHA, - GL_UNSIGNED_BYTE, image.bits()); + GLuint texture; + glGenTextures(1, &texture); + glBindTexture(GL_TEXTURE_2D, texture); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, image.width(), image.height(), + 0, GL_ALPHA, GL_UNSIGNED_BYTE, image.bits()); info = new QGLBlurTextureInfo(image, texture, r); } |