From 7b780b9f9b193777265d64967fb9546b16f8d1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 20 Apr 2012 12:24:51 +0200 Subject: [PATCH] Added missing const to camera matrix. --- src/Camera.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Camera.cpp b/src/Camera.cpp index ed486fc1a..2bd6781e3 100644 --- a/src/Camera.cpp +++ b/src/Camera.cpp @@ -45,10 +45,10 @@ void Camera::setPerspective(GLfloat fov, GLfloat near, GLfloat far) { rawProjectionMatrix = Matrix4::translation(Vector3::zAxis(2*far*near/(far+near))); /* Then apply magic perspective matrix (with reversed Z) */ - static Matrix4 a(1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, -1.0f, -1.0f, - 0.0f, 0.0f, 0.0f, 0.0f); + static const Matrix4 a(1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, -1.0f, -1.0f, + 0.0f, 0.0f, 0.0f, 0.0f); rawProjectionMatrix = a*rawProjectionMatrix; /* Then scale the volume down so it fits in (-1, 1) in all directions */