summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-12-11 14:24:34 +0000
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2022-12-12 09:18:14 +0000
commit56ae990fb97413fd5095f73fef01daffc7316c8b (patch)
tree633be7ae0d079546d2bd9c4ef6b15da3a0fc72e6 /gfx/gl/camera.cpp
parentMake Camera members private with accessors and helpful setters (diff)
downloadilt-56ae990fb97413fd5095f73fef01daffc7316c8b.tar.bz2
ilt-56ae990fb97413fd5095f73fef01daffc7316c8b.tar.xz
ilt-56ae990fb97413fd5095f73fef01daffc7316c8b.zip
Have Camera remember all its properties
Diffstat (limited to 'gfx/gl/camera.cpp')
-rw-r--r--gfx/gl/camera.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp
index 0e81282..1c46200 100644
--- a/gfx/gl/camera.cpp
+++ b/gfx/gl/camera.cpp
@@ -4,7 +4,8 @@
#include <ray.hpp>
Camera::Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar) :
- position {pos}, forward {::north}, up {::up}, projection {glm::perspective(fov, aspect, zNear, zFar)}
+ position {pos}, forward {::north}, up {::up}, fov {fov}, aspect {aspect}, near {zNear}, far {zFar},
+ projection {glm::perspective(fov, aspect, zNear, zFar)}
{
}