1b18315001
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>
27 lines
427 B
C++
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;
|
|
};
|