From 7c0073aaa23769a9e9ec08d595190ce61227ae8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 19 May 2009 15:23:07 +0200 Subject: 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 --- src/opengl/qpixmapdata_gl.cpp | 2 ++ 1 file changed, 2 insertions(+) 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()) { -- cgit v0.12