diff options
Diffstat (limited to 'examples/opengl/hellowindow/hellowindow.h')
-rw-r--r-- | examples/opengl/hellowindow/hellowindow.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h index 6d66f0204a..6a6fa275e2 100644 --- a/examples/opengl/hellowindow/hellowindow.h +++ b/examples/opengl/hellowindow/hellowindow.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. @@ -43,6 +43,7 @@ #include <QColor> #include <QMutex> #include <QOpenGLShaderProgram> +#include <QOpenGLBuffer> #include <QSharedPointer> #include <QTimer> @@ -65,13 +66,13 @@ private slots: private: void initialize(); - qreal m_fAngle; - bool m_showBubbles; - void paintQtLogo(); void createGeometry(); void createBubbles(int number); void quad(qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4); void extrude(qreal x1, qreal y1, qreal x2, qreal y2); + + qreal m_fAngle; + QVector<QVector3D> vertices; QVector<QVector3D> normals; int vertexAttr; @@ -83,6 +84,7 @@ private: QSurfaceFormat m_format; QOpenGLContext *m_context; QOpenGLShaderProgram *m_program; + QOpenGLBuffer m_vbo; QList<HelloWindow *> m_windows; int m_currentWindow; @@ -98,10 +100,10 @@ public: QColor color() const; void updateColor(); - void exposeEvent(QExposeEvent *event); + void exposeEvent(QExposeEvent *event) Q_DECL_OVERRIDE; private: - void mousePressEvent(QMouseEvent *); + void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE; int m_colorIndex; QColor m_color; |