X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FViewport.hpp;h=69c66a7310ca5f04878a59cdcadbf01e6a854494;hb=HEAD;hp=96fbaa4deae54840efb53a1bb7fa2474a17d1b21;hpb=54f3f1260b95a924fcb40d9d6de3fa2e2c382f6f;p=blank.git diff --git a/src/graphics/Viewport.hpp b/src/graphics/Viewport.hpp index 96fbaa4..69c66a7 100644 --- a/src/graphics/Viewport.hpp +++ b/src/graphics/Viewport.hpp @@ -7,11 +7,10 @@ #include "Camera.hpp" #include "Canvas.hpp" #include "DirectionalLighting.hpp" +#include "glm.hpp" #include "PlainColor.hpp" #include "SkyBoxShader.hpp" -#include - namespace blank { @@ -23,7 +22,7 @@ public: Viewport(const Viewport &) = delete; Viewport &operator =(const Viewport &) = delete; - void VSync(bool b) noexcept; + void VSync(bool b); void EnableDepthTest() noexcept; void EqualDepthTest() noexcept; @@ -51,6 +50,9 @@ public: void MoveCursor(const glm::vec3 &) noexcept; const glm::mat4 &Cursor() const noexcept { return cursor; } + void OffsetCamera(const glm::vec3 &o) noexcept { cam_offset = o; } + const glm::vec3 &CameraOffset() const noexcept { return cam_offset; } + BlockLighting &ChunkProgram() noexcept; DirectionalLighting &EntityProgram() noexcept; DirectionalLighting &HUDProgram() noexcept; @@ -70,6 +72,8 @@ private: glm::mat4 cursor; + glm::vec3 cam_offset; + BlockLighting chunk_prog; DirectionalLighting entity_prog; PlainColor color_prog;