]> git.localhorst.tv Git - blank.git/blob - src/app.hpp
extracted projection and viewport to camera class
[blank.git] / src / app.hpp
1 #ifndef BLANK_APP_HPP_
2 #define BLANK_APP_HPP_
3
4 #include <glm/glm.hpp>
5 #include <glm/gtc/matrix_transform.hpp>
6
7 #include "camera.hpp"
8 #include "init.hpp"
9 #include "shader.hpp"
10
11
12 namespace blank {
13
14 class Application {
15
16 public:
17         Application();
18         ~Application();
19
20         Application(const Application &) = delete;
21         Application &operator =(const Application &) = delete;
22
23         void Run();
24         void Loop(int dt);
25
26         void HandleEvents();
27         void Render();
28
29 private:
30         InitSDL init_sdl;
31         InitGL init_gl;
32         Window window;
33         GLContext ctx;
34         InitGLEW init_glew;
35         Program program;
36
37         Camera cam;
38
39         GLuint vtx_buf;
40         GLuint mvp_handle;
41
42         bool running;
43
44 };
45
46 }
47
48 #endif