X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FViewport.hpp;h=de62c4847c9cc67309030c6886ee66b394c19502;hb=d2f4c8720ae2326fac4203fa4984d835e875b355;hp=a8cb69f0947f70cee14b6fc20df6f544b5114b1b;hpb=75172fd735e34082c34b47ae7c194445b53038d9;p=blank.git diff --git a/src/graphics/Viewport.hpp b/src/graphics/Viewport.hpp index a8cb69f..de62c48 100644 --- a/src/graphics/Viewport.hpp +++ b/src/graphics/Viewport.hpp @@ -23,7 +23,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; @@ -44,11 +44,16 @@ public: void Clear() noexcept; void ClearDepth() noexcept; - void SetCursor(const glm::vec3 &); - void SetCursor(const glm::vec3 &, Gravity); - void MoveCursor(const glm::vec3 &); + glm::vec2 GetPosition(const glm::vec2 &off, Gravity grav) const noexcept; + + void SetCursor(const glm::vec3 &) noexcept; + void SetCursor(const glm::vec3 &, Gravity) noexcept; + 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; @@ -68,6 +73,8 @@ private: glm::mat4 cursor; + glm::vec3 cam_offset; + BlockLighting chunk_prog; DirectionalLighting entity_prog; PlainColor color_prog;