diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2011-05-25 17:03:59 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-25 18:55:12 +0200 |
commit | dea9ca8b7a4166e1c3d3fc374621ad02c1220d3a (patch) | |
tree | d2491b15f4b2e9e4b66b9630f856d135f3f34d91 /examples/opengl/cube | |
parent | 635af8d700087b24bd8c212b14cf644e0f71a6fc (diff) |
Fix for compiling and running cube example on Windows.
Change-Id: I0bf933fe81e332c03a81874cb371fa423634621b
Reviewed-on: http://codereview.qt.nokia.com/125
Reviewed-by: David Boddie
Diffstat (limited to 'examples/opengl/cube')
-rw-r--r-- | examples/opengl/cube/geometryengine.cpp | 2 | ||||
-rw-r--r-- | examples/opengl/cube/mainwidget.cpp | 2 | ||||
-rw-r--r-- | examples/opengl/cube/mainwidget.h | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp index 2f6f65948d..01a33f3bb7 100644 --- a/examples/opengl/cube/geometryengine.cpp +++ b/examples/opengl/cube/geometryengine.cpp @@ -21,6 +21,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 bead5f79ed..682ce5c9e7 100644 --- a/examples/opengl/cube/mainwidget.cpp +++ b/examples/opengl/cube/mainwidget.cpp @@ -78,6 +78,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 595173b65d..75d069d2f6 100644 --- a/examples/opengl/cube/mainwidget.h +++ b/examples/opengl/cube/mainwidget.h @@ -2,6 +2,7 @@ #define MAINWIDGET_H #include <QtOpenGL/QGLWidget> +#include <QtOpenGL/QGLFunctions> #include <QMatrix4x4> #include <QQuaternion> @@ -12,7 +13,7 @@ class QGLShaderProgram; class GeometryEngine; -class MainWidget : public QGLWidget +class MainWidget : public QGLWidget, protected QGLFunctions { Q_OBJECT public: |