summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglframebufferobject.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-09 04:57:00 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-09 04:57:00 (GMT)
commitf370b5d986529155baf7d9dd95678854df4105e0 (patch)
tree4d6259d58ae1df16440fca07678f8bdcb3c96c1a /src/opengl/qglframebufferobject.cpp
parent8f7e7aab93bc3759b46b657b38e99dae1502fd80 (diff)
downloadQt-f370b5d986529155baf7d9dd95678854df4105e0.zip
Qt-f370b5d986529155baf7d9dd95678854df4105e0.tar.gz
Qt-f370b5d986529155baf7d9dd95678854df4105e0.tar.bz2
Check the framebuffer format against a format, not a texture target
The previous code was comparing QGLFramebufferObjectFormat::textureTarget() against GL_RGB to determine if alpha was present. This should be internalTextureFormat() instead. Reviewed-by: Sarah Smith
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r--src/opengl/qglframebufferobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 3e54b35..5585208 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -988,7 +988,7 @@ QImage QGLFramebufferObject::toImage() const
bool wasBound = isBound();
if (!wasBound)
const_cast<QGLFramebufferObject *>(this)->bind();
- QImage image = qt_gl_read_framebuffer(d->size, format().textureTarget() != GL_RGB, true);
+ QImage image = qt_gl_read_framebuffer(d->size, format().internalTextureFormat() != GL_RGB, true);
if (!wasBound)
const_cast<QGLFramebufferObject *>(this)->release();