From dec5fb4bf9424f1e9e656e240635f2e706c9faab Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 3 Jul 2014 10:54:24 +0200 Subject: 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 --- src/gui/opengl/qopenglframebufferobject.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/opengl/qopenglframebufferobject.h') 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); -- cgit v1.2.1