X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FHUD.hpp;fp=src%2Fui%2FHUD.hpp;h=ca6b7544a54ee9a15f7639bb2e1f6fba65376724;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=0000000000000000000000000000000000000000;hpb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;p=blank.git diff --git a/src/ui/HUD.hpp b/src/ui/HUD.hpp new file mode 100644 index 0000000..ca6b754 --- /dev/null +++ b/src/ui/HUD.hpp @@ -0,0 +1,50 @@ +#ifndef BLANK_UI_HUD_H_ +#define BLANK_UI_HUD_H_ + +#include "../model/Model.hpp" +#include "../model/OutlineModel.hpp" + +#include + + +namespace blank { + +class Block; +class BlockTypeRegistry; +class DirectionalLighting; + +class HUD { + +public: + explicit HUD(const BlockTypeRegistry &); + + HUD(const HUD &) = delete; + HUD &operator =(const HUD &) = delete; + + void Viewport(float width, float height) noexcept; + void Viewport(float x, float y, float width, float height) noexcept; + + void Display(const Block &); + + void Render(DirectionalLighting &) noexcept; + +private: + const BlockTypeRegistry &types; + + Model block; + Model::Buffer block_buf; + glm::mat4 block_transform; + bool block_visible; + + OutlineModel crosshair; + glm::mat4 crosshair_transform; + + float near, far; + glm::mat4 projection; + glm::mat4 view; + +}; + +} + +#endif