From d79ac03fb632a1d9d7cad4f282c359f0ee4dcc71 Mon Sep 17 00:00:00 2001 From: David Williams Date: Tue, 25 Mar 2014 23:03:18 +0100 Subject: [PATCH] VS2012 doesn't accept these curly brackets (C++11 initializer lists?). The code seems to work without them though. --- examples/Basic/OpenGLWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Basic/OpenGLWidget.cpp b/examples/Basic/OpenGLWidget.cpp index e3c89cb5..9adcf3bf 100644 --- a/examples/Basic/OpenGLWidget.cpp +++ b/examples/Basic/OpenGLWidget.cpp @@ -121,7 +121,7 @@ void OpenGLWidget::initializeGL() shader.bind(); - QMatrix4x4 worldToCameraMatrix{}; + QMatrix4x4 worldToCameraMatrix; worldToCameraMatrix.translate(0, 0, -50); //Move the camera back by 50 units shader.setUniformValue("worldToCameraMatrix", worldToCameraMatrix); @@ -138,7 +138,7 @@ void OpenGLWidget::resizeGL(int w, int h) float zNear = 1.0; float zFar = 1000.0; - QMatrix4x4 cameraToClipMatrix{}; + QMatrix4x4 cameraToClipMatrix; cameraToClipMatrix.frustum(-aspectRatio, aspectRatio, -1, 1, zNear, zFar); shader.bind(); @@ -151,7 +151,7 @@ void OpenGLWidget::paintGL() //Clear the screen glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - QMatrix4x4 modelToWorldMatrix{}; + QMatrix4x4 modelToWorldMatrix; modelToWorldMatrix.rotate(m_xRotation, 0, 1, 0); //rotate around y-axis modelToWorldMatrix.rotate(m_yRotation, 1, 0, 0); //rotate around x-axis modelToWorldMatrix.translate(-32, -32, -32); //centre the model on the origin