3 #include "geometry.hpp"
6 #include <glm/gtc/matrix_transform.hpp>
16 , projection(glm::perspective(fov, aspect, near_clip, far_clip)) {
21 void Camera::Viewport(int width, int height) {
22 Viewport(0, 0, width, height);
25 void Camera::Viewport(int x, int y, int width, int height) {
26 glViewport(x, y, width, height);
27 Aspect(width, height);
30 void Camera::FOV(float f) {
35 void Camera::Aspect(float r) {
40 void Camera::Aspect(float w, float h) {
44 void Camera::Clip(float near, float far) {
51 void Camera::UpdateProjection() {
52 projection = glm::perspective(fov, aspect, near_clip, far_clip);