summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-07-04 14:44:29 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-07-04 14:44:29 (GMT)
commit25bbcf9605f65548d7f581304b7d8ad300aa9937 (patch)
tree8c43f31dd75f92dc58cd0e8d7cd01662ca21aed8 /examples
parent5a3817631fb8de1cd5b53d6001a2e770aa9ff189 (diff)
downloadQt-25bbcf9605f65548d7f581304b7d8ad300aa9937.zip
Qt-25bbcf9605f65548d7f581304b7d8ad300aa9937.tar.gz
Qt-25bbcf9605f65548d7f581304b7d8ad300aa9937.tar.bz2
Applied fix (dea9ca8b7a4166e1c3d3fc374621ad02c1220d3a)from qt5/qtbase.
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/cube/geometryengine.cpp2
-rw-r--r--examples/opengl/cube/mainwidget.cpp2
-rw-r--r--examples/opengl/cube/mainwidget.h3
3 files changed, 6 insertions, 1 deletions
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
index 3001ed5..c05dde5 100644
--- a/examples/opengl/cube/geometryengine.cpp
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -61,6 +61,8 @@ GeometryEngine::~GeometryEngine()
void GeometryEngine::init()
{
+ initializeGLFunctions();
+
//! [0]
// Generate 2 VBOs
glGenBuffers(2, vboIds);
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
index 2a2cd63..1116526 100644
--- a/examples/opengl/cube/mainwidget.cpp
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -118,6 +118,8 @@ void MainWidget::timerEvent(QTimerEvent *e)
void MainWidget::initializeGL()
{
+ initializeGLFunctions();
+
qglClearColor(Qt::black);
qDebug() << "Initializing shaders...";
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index 33ab0d8..c6da29f 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -42,6 +42,7 @@
#define MAINWIDGET_H
#include <QtOpenGL/QGLWidget>
+#include <QtOpenGL/QGLFunctions>
#include <QMatrix4x4>
#include <QQuaternion>
@@ -52,7 +53,7 @@ class QGLShaderProgram;
class GeometryEngine;
-class MainWidget : public QGLWidget
+class MainWidget : public QGLWidget, protected QGLFunctions
{
Q_OBJECT
public: