summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting/composition/composition.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-07-11 15:12:56 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-10-17 09:16:01 +0000
commit0ead3b7142e47b89059af689de4ede47075375be (patch)
treede3c43993ccbc1d65ad304ef82eb3f430a0dd587 /examples/widgets/painting/composition/composition.h
parent16ebc78ef3280bf284da9a49bdd3fc1fabad347f (diff)
Move arthurwidget based examples to new QOpenGL classes
Several of the examples were not even working besides using deprecated classes. Change-Id: I352e0629d490593edcc5868d2ec5a8ff222eaeab Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples/widgets/painting/composition/composition.h')
-rw-r--r--examples/widgets/painting/composition/composition.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/widgets/painting/composition/composition.h b/examples/widgets/painting/composition/composition.h
index 49853f503b..19150e2024 100644
--- a/examples/widgets/painting/composition/composition.h
+++ b/examples/widgets/painting/composition/composition.h
@@ -53,6 +53,11 @@
#include "arthurwidgets.h"
+#if QT_CONFIG(opengl)
+#include "fbopaintdevice.h"
+#include <QOpenGLTextureBlitter>
+#endif
+
#include <QPainter>
#include <QEvent>
@@ -61,10 +66,6 @@ class QPushButton;
class QRadioButton;
QT_END_NAMESPACE
-#ifdef QT_OPENGL_SUPPORT
-#include <QtOpenGL>
-#endif
-
class CompositionWidget : public QWidget
{
Q_OBJECT
@@ -186,12 +187,13 @@ private:
bool m_animation_enabled;
int m_animationTimer;
-#ifdef QT_OPENGL_SUPPORT
- QGLPixelBuffer *m_pbuffer;
- GLuint m_base_tex;
- GLuint m_compositing_tex;
+#if QT_CONFIG(opengl)
+ QScopedPointer<QFboPaintDevice> m_fbo;
int m_pbuffer_size; // width==height==size of pbuffer
+ uint m_base_tex;
+ uint m_compositing_tex;
QSize m_previous_size;
+ QOpenGLTextureBlitter m_blitter;
#endif
};