From e66511d118f702928c9649bb802a7a2faf0b5c11 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 16 Oct 2014 12:07:57 +0300 Subject: [PATCH] Initialize camera matrices in constructor --- source/camera.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/camera.cpp b/source/camera.cpp index 0202bedf..fca3ea33 100644 --- a/source/camera.cpp +++ b/source/camera.cpp @@ -15,7 +15,10 @@ Camera::Camera(): position(0, 0, 0), look_dir(0, 0, -1), up_dir(0, 1, 0) -{ } +{ + update_projection_matrix(); + update_object_matrix(); +} void Camera::set_field_of_view(const Geometry::Angle &f) { -- 2.45.2