]> git.localhorst.tv Git - blank.git/blob - src/app.hpp
6bd4e0d9a14a65e615eb62f9f14df5f8b33f5c9b
[blank.git] / src / app.hpp
1 #ifndef BLANK_APP_HPP_
2 #define BLANK_APP_HPP_
3
4 #include "camera.hpp"
5 #include "init.hpp"
6 #include "interface.hpp"
7 #include "shader.hpp"
8 #include "world.hpp"
9
10
11 namespace blank {
12
13 class Application {
14
15 public:
16         Application();
17
18         Application(const Application &) = delete;
19         Application &operator =(const Application &) = delete;
20
21         /// run until user quits
22         void Run();
23         void Loop(int dt);
24
25         /// run for n frames
26         void RunN(size_t n);
27         /// run for t milliseconds
28         void RunT(size_t t);
29         /// run for n frames, assuming t milliseconds for each
30         void RunS(size_t n, size_t t);
31
32         void HandleEvents();
33         void Update(int dt);
34         void Render();
35
36 private:
37         InitSDL init_sdl;
38         InitIMG init_img;
39         InitGL init_gl;
40         Window window;
41         GLContext ctx;
42         InitGLEW init_glew;
43         DirectionalLighting program;
44
45         Camera cam;
46         World world;
47         Interface interface;
48
49         bool running;
50
51 };
52
53 }
54
55 #endif