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