summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglcompositor_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qopenglcompositor_p.h')
-rw-r--r--src/opengl/qopenglcompositor_p.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/opengl/qopenglcompositor_p.h b/src/opengl/qopenglcompositor_p.h
index f2059f90fad..86229b13ca3 100644
--- a/src/opengl/qopenglcompositor_p.h
+++ b/src/opengl/qopenglcompositor_p.h
@@ -47,6 +47,11 @@ class Q_OPENGL_EXPORT QOpenGLCompositor : public QObject
Q_OBJECT
public:
+ enum GrabOrientation {
+ Flipped,
+ NotFlipped,
+ };
+
static QOpenGLCompositor *instance();
static void destroy();
@@ -60,7 +65,7 @@ public:
void update();
QImage grab();
- bool grabToFrameBufferObject(QOpenGLFramebufferObject *fbo);
+ bool grabToFrameBufferObject(QOpenGLFramebufferObject *fbo, GrabOrientation orientation = Flipped);
QList<QOpenGLCompositorWindow *> windows() const { return m_windows; }
void addWindow(QOpenGLCompositorWindow *window);
@@ -78,8 +83,10 @@ private:
QOpenGLCompositor();
~QOpenGLCompositor();
- void renderAll(QOpenGLFramebufferObject *fbo);
- void render(QOpenGLCompositorWindow *window);
+ void renderAll(QOpenGLFramebufferObject *fbo,
+ QOpenGLTextureBlitter::Origin origin = QOpenGLTextureBlitter::OriginTopLeft);
+ void render(QOpenGLCompositorWindow *window,
+ QOpenGLTextureBlitter::Origin origin = QOpenGLTextureBlitter::OriginTopLeft);
void ensureCorrectZOrder();
QOpenGLContext *m_context;