summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogl_es2
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/hellogl_es2')
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp2
-rw-r--r--examples/opengl/hellogl_es2/glwidget.h11
2 files changed, 8 insertions, 5 deletions
diff --git a/examples/opengl/hellogl_es2/glwidget.cpp b/examples/opengl/hellogl_es2/glwidget.cpp
index 7267cfd124..733475d321 100644
--- a/examples/opengl/hellogl_es2/glwidget.cpp
+++ b/examples/opengl/hellogl_es2/glwidget.cpp
@@ -171,6 +171,8 @@ void GLWidget::paintTexturedCube()
void GLWidget::initializeGL ()
{
+ initializeOpenGLFunctions();
+
glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
glGenTextures(1, &m_uiTexture);
diff --git a/examples/opengl/hellogl_es2/glwidget.h b/examples/opengl/hellogl_es2/glwidget.h
index 8ed86b1e01..00073aa047 100644
--- a/examples/opengl/hellogl_es2/glwidget.h
+++ b/examples/opengl/hellogl_es2/glwidget.h
@@ -42,15 +42,16 @@
#define GLWIDGET_H
#include <QGLWidget>
-#include <QtGui/qvector3d.h>
-#include <QtGui/qmatrix4x4.h>
-#include <QtOpenGL/qglshaderprogram.h>
+#include <QOpenGLFunctions>
+#include <QGLShaderProgram>
+#include <QVector3D>
+#include <QMatrix4x4>
#include <QTime>
#include <QVector>
class Bubble;
-class GLWidget : public QGLWidget {
-
+class GLWidget : public QGLWidget, protected QOpenGLFunctions
+{
Q_OBJECT
public:
GLWidget(QWidget *parent = 0);