Fix for compiling and running cube example on Windows.
Change-Id: I0bf933fe81e332c03a81874cb371fa423634621b Reviewed-on: http://codereview.qt.nokia.com/125 Reviewed-by: David Boddiebb10
parent
635af8d700
commit
dea9ca8b7a
|
|
@ -21,6 +21,8 @@ GeometryEngine::~GeometryEngine()
|
|||
|
||||
void GeometryEngine::init()
|
||||
{
|
||||
initializeGLFunctions();
|
||||
|
||||
//! [0]
|
||||
// Generate 2 VBOs
|
||||
glGenBuffers(2, vboIds);
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ void MainWidget::timerEvent(QTimerEvent *e)
|
|||
|
||||
void MainWidget::initializeGL()
|
||||
{
|
||||
initializeGLFunctions();
|
||||
|
||||
qglClearColor(Qt::black);
|
||||
|
||||
qDebug() << "Initializing shaders...";
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue