]> git.tdb.fi Git - libs/gl.git/commitdiff
Initialize camera matrices in constructor
authorMikko Rasa <tdb@tdb.fi>
Thu, 16 Oct 2014 09:07:57 +0000 (12:07 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 16 Oct 2014 09:07:57 +0000 (12:07 +0300)
source/camera.cpp

index 0202bedf68ff9e2bdd166f9fc57102da6450e8e5..fca3ea33d504773d90e073c598175a33d9be2f46 100644 (file)
@@ -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<float> &f)
 {