summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.h
blob: 9fbb0a183ea22bd47eb5fce62be03ca5564e4d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#include <glm/glm.hpp>

class Camera {
public:
	Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar);

	[[nodiscard]] glm::mat4 GetViewProjection() const;
	[[nodiscard]] glm::vec3 unProject(const glm::vec2 &) const;

	glm::vec3 pos;
	glm::vec3 forward;
	glm::vec3 up;

private:
	glm::mat4 projection;
};