diff options
Diffstat (limited to 'examples/widgets/painting/composition/composition.h')
-rw-r--r-- | examples/widgets/painting/composition/composition.h | 18 |
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 }; |