Fix for compiling and running cube example on Windows.

Change-Id: I0bf933fe81e332c03a81874cb371fa423634621b
Reviewed-on: http://codereview.qt.nokia.com/125
Reviewed-by: David Boddie
bb10
Kim Motoyoshi Kalland 2011-05-25 17:03:59 +02:00 committed by Qt Continuous Integration System
parent 635af8d700
commit dea9ca8b7a
3 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,8 @@ GeometryEngine::~GeometryEngine()
void GeometryEngine::init()
{
initializeGLFunctions();
//! [0]
// Generate 2 VBOs
glGenBuffers(2, vboIds);

View File

@ -78,6 +78,8 @@ void MainWidget::timerEvent(QTimerEvent *e)
void MainWidget::initializeGL()
{
initializeGLFunctions();
qglClearColor(Qt::black);
qDebug() << "Initializing shaders...";

View File

@ -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: