diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-05-19 13:23:07 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-05-25 08:43:51 (GMT) |
commit | 7c0073aaa23769a9e9ec08d595190ce61227ae8c (patch) | |
tree | 58a9ec11fcecc8de9b0ac15eccc9fcdb320c6bbd | |
parent | 886c537f2fa225eecc5a68670688e390445a3936 (diff) | |
download | Qt-7c0073aaa23769a9e9ec08d595190ce61227ae8c.zip Qt-7c0073aaa23769a9e9ec08d595190ce61227ae8c.tar.gz Qt-7c0073aaa23769a9e9ec08d595190ce61227ae8c.tar.bz2 |
Fixed bug in uninitialized GL pixmaps.
When not setting filtering mode to GL_NEAREST/GL_LINEAR copying back
from FBO to texture fails for some reason.
Reviewed-by: Trond
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index e3af864..c89b99b 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -167,6 +167,8 @@ void QGLPixmapData::ensureCreated() const glBindTexture(target, m_textureId); glTexImage2D(target, 0, GL_RGBA, m_width, m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); } if (!m_source.isNull()) { |