summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-09 14:57:00 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-09 14:57:00 +1000
commitf370b5d986529155baf7d9dd95678854df4105e0 (patch)
tree4d6259d58ae1df16440fca07678f8bdcb3c96c1a /src
parent8f7e7aab93bc3759b46b657b38e99dae1502fd80 (diff)
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')
-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 3e54b353fa..558520823d 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();