]> git.localhorst.tv Git - blank.git/blob - src/hud.hpp
minor optimizations in chunk
[blank.git] / src / hud.hpp
1 #ifndef BLANK_HUD_H_
2 #define BLANK_HUD_H_
3
4 #include "model.hpp"
5 #include "world.hpp"
6
7 #include <glm/glm.hpp>
8
9
10 namespace blank {
11
12 class BlockTypeRegistry;
13 class DirectionalLighting;
14
15 class HUD {
16
17 public:
18         explicit HUD(const BlockTypeRegistry &);
19
20         HUD(const HUD &) = delete;
21         HUD &operator =(const HUD &) = delete;
22
23         void Viewport(float width, float height) noexcept;
24         void Viewport(float x, float y, float width, float height) noexcept;
25
26         void Display(const Block &);
27
28         void Render(DirectionalLighting &) noexcept;
29
30 private:
31         const BlockTypeRegistry &types;
32
33         Model block;
34         Model::Buffer block_buf;
35         glm::mat4 block_transform;
36         bool block_visible;
37
38         OutlineModel crosshair;
39         glm::mat4 crosshair_transform;
40
41         float near, far;
42         glm::mat4 projection;
43         glm::mat4 view;
44
45 };
46
47 }
48
49 #endif