summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogl_es2/glwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/hellogl_es2/glwidget.h')
-rw-r--r--examples/opengl/hellogl_es2/glwidget.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/examples/opengl/hellogl_es2/glwidget.h b/examples/opengl/hellogl_es2/glwidget.h
index 9a7823a..596e1cc 100644
--- a/examples/opengl/hellogl_es2/glwidget.h
+++ b/examples/opengl/hellogl_es2/glwidget.h
@@ -43,7 +43,11 @@
#define GLWIDGET_H
#include <QGLWidget>
+#include <QtGui/qvector3d.h>
+#include <QtGui/qmatrix4x4.h>
+#include <QtOpenGL/qglshaderprogram.h>
#include <QTime>
+#include <QVector>
class Bubble;
class GLWidget : public QGLWidget {
@@ -71,24 +75,21 @@ private:
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);
- QList<qreal> vertices;
- QList<qreal> normals;
- GLfloat *createdVertices;
- GLfloat *createdNormals;
- int m_vertexNumber;
+ QVector<QVector3D> vertices;
+ QVector<QVector3D> normals;
bool qtLogo;
QList<Bubble*> bubbles;
int frames;
QTime time;
- GLuint program1;
- GLuint program2;
- GLuint vertexAttr1;
- GLuint normalAttr1;
- GLuint matrixUniform1;
- GLuint vertexAttr2;
- GLuint normalAttr2;
- GLuint texCoordAttr2;
- GLuint matrixUniform2;
- GLuint textureUniform2;
+ QGLShaderProgram program1;
+ QGLShaderProgram program2;
+ int vertexAttr1;
+ int normalAttr1;
+ int matrixUniform1;
+ int vertexAttr2;
+ int normalAttr2;
+ int texCoordAttr2;
+ int matrixUniform2;
+ int textureUniform2;
};
#endif