summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglframebufferobject.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-03 10:54:24 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-04 11:19:08 +0200
commitdec5fb4bf9424f1e9e656e240635f2e706c9faab (patch)
tree7973fc57c2cf9e3812f5afc6494b30322fe2d37e /src/gui/opengl/qopenglframebufferobject.h
parent21c8385105dde242384b5ce05bc953a9995403f4 (diff)
Improve QOpenGLFramebufferObject::toImage()
This patch makes it possible to use QOpenGLFramebufferObject::toImage() together with QOpenGLPaintDevice::setPaintFlipped where the FBO is already mirrored. The patch also makes checks for proper BGRA support before trying to use it, and fixes the rare case of OpenGLES on big endian. [ChangeLog][QtGui][QOpenGLFramebufferObject] Introduce an argument to QOpenGLFramebufferObject::toImage() to save mirroring the result. Change-Id: I163d802736b7059411f7dda96a31385d772823cc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/gui/opengl/qopenglframebufferobject.h')
-rw-r--r--src/gui/opengl/qopenglframebufferobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.h b/src/gui/opengl/qopenglframebufferobject.h
index 3df929c210..0b1aaae36d 100644
--- a/src/gui/opengl/qopenglframebufferobject.h
+++ b/src/gui/opengl/qopenglframebufferobject.h
@@ -94,6 +94,7 @@ public:
GLuint takeTexture();
QSize size() const;
QImage toImage() const;
+ QImage toImage(bool flipped) const;
Attachment attachment() const;
void setAttachment(Attachment attachment);