qt5base-lts/examples/opengl/paintedwindow/paintedwindow.h
Samuel Rødal 1b18315001 Improved and made public the QOpenGLPaintDevice API.
The new API is more flexible, allowing the use of QOpenGLPaintDevice
with any QOpenGLContext, and putting more responsibility on the user for
ensuring the correct FBO is current (the user knows best anyhow).

Task-number: QTBUG-21263

Change-Id: I50b954125f552baef52fbb3fe2ed907a11ad519c
Reviewed-on: http://codereview.qt-project.org/4325
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-09-08 11:07:56 +02:00

27 lines
427 B
C++

#include <QWindow>
#include <QtGui/qopengl.h>
#include <QtGui/qopenglshaderprogram.h>
#include <QtGui/qopenglframebufferobject.h>
#include <QColor>
#include <QTime>
class QOpenGLContext;
class PaintedWindow : public QWindow
{
Q_OBJECT
public:
PaintedWindow();
private slots:
void paint();
private:
void resizeEvent(QResizeEvent *);
void exposeEvent(QExposeEvent *);
QOpenGLContext *m_context;
};