]> git.localhorst.tv Git - blank.git/blob - src/app.hpp
block type colors
[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 "controller.hpp"
9 #include "init.hpp"
10 #include "shader.hpp"
11 #include "world.hpp"
12
13
14 namespace blank {
15
16 class Application {
17
18 public:
19         Application();
20         ~Application();
21
22         Application(const Application &) = delete;
23         Application &operator =(const Application &) = delete;
24
25         void Run();
26         void Loop(int dt);
27
28         void HandleEvents();
29         void Update(int dt);
30         void Render();
31
32 private:
33         InitSDL init_sdl;
34         InitIMG init_img;
35         InitGL init_gl;
36         Window window;
37         GLContext ctx;
38         InitGLEW init_glew;
39         Program program;
40
41         float move_velocity;
42         float pitch_sensitivity;
43         float yaw_sensitivity;
44
45         BlockTypeRegistry blockType;
46
47         Camera cam;
48         Chunk chunk;
49
50         glm::vec3 light_position;
51         glm::vec3 light_color;
52         float light_power;
53
54         GLuint m_handle;
55         GLuint v_handle;
56         GLuint mv_handle;
57         GLuint mvp_handle;
58         GLuint light_position_handle;
59         GLuint light_color_handle;
60         GLuint light_power_handle;
61
62         bool running;
63
64         bool front, back, left, right, up, down;
65
66 };
67
68 }
69
70 #endif