]> git.localhorst.tv Git - tacos.git/blob - src/graphics/viewport.hpp
basic floor idea
[tacos.git] / src / graphics / viewport.hpp
1 #ifndef TACOS_GRAPHICS_VIEWPORT_HPP_
2 #define TACOS_GRAPHICS_VIEWPORT_HPP_
3
4 #include <glm/glm.hpp>
5
6
7 namespace tacos {
8
9 class Viewport {
10
11 public:
12         Viewport(int width, int height);
13
14         Viewport(const Viewport &) = delete;
15         Viewport &operator =(const Viewport &) = delete;
16
17         void Resize(int w, int h) noexcept;
18
19         int Width() const noexcept { return width; }
20         int Height() const noexcept { return height; }
21
22         const glm::mat4 &Perspective() const noexcept { return perspective; }
23         const glm::mat4 &Ortho() const noexcept { return ortho; }
24
25 private:
26         int width;
27         int height;
28
29         float fov;
30         float aspect;
31         float near;
32         float far;
33
34         glm::mat4 perspective;
35         glm::mat4 ortho;
36
37 };
38
39 }
40
41 #endif