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 */