X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FViewport.hpp;h=4d55d8893dadbe289bd3a9c835170c1709ba4906;hb=38a4cffc0b6aa58e49d24c06aad7bee14cb6515d;hp=d64e580e56676bcc9024ce302c01bc07f8528885;hpb=5d2da8a07411ad6417d6ed8d1be997189cf5ce89;p=blank.git diff --git a/src/graphics/Viewport.hpp b/src/graphics/Viewport.hpp index d64e580..4d55d88 100644 --- a/src/graphics/Viewport.hpp +++ b/src/graphics/Viewport.hpp @@ -1,14 +1,15 @@ #ifndef BLANK_GRAPHICS_VIEWPORT_HPP_ #define BLANK_GRAPHICS_VIEWPORT_HPP_ +#include "align.hpp" #include "BlendedSprite.hpp" #include "BlockLighting.hpp" #include "Camera.hpp" #include "Canvas.hpp" #include "DirectionalLighting.hpp" +#include "PlainColor.hpp" #include -#include namespace blank { @@ -41,26 +42,32 @@ public: void Clear() noexcept; void ClearDepth() noexcept; + void SetCursor(const glm::vec3 &); + void SetCursor(const glm::vec3 &, Gravity); + void MoveCursor(const glm::vec3 &); + const glm::mat4 &Cursor() const noexcept { return cursor; } + BlockLighting &ChunkProgram() noexcept; DirectionalLighting &EntityProgram() noexcept; DirectionalLighting &HUDProgram() noexcept; + PlainColor &WorldOutlineProgram() noexcept; + PlainColor &HUDOutlineProgram() noexcept; BlendedSprite &SpriteProgram() noexcept; void WorldPosition(const glm::mat4 &) noexcept; const glm::mat4 &Perspective() const noexcept { return cam.Projection(); } const glm::mat4 &Ortho() const noexcept { return canv.Projection(); } - const glm::mat4 &CenterTransform() const noexcept { return center; } private: - SDL_GLContext ctx; Camera cam; Canvas canv; - glm::mat4 center; + glm::mat4 cursor; BlockLighting chunk_prog; DirectionalLighting entity_prog; + PlainColor outline_prog; BlendedSprite sprite_prog; enum { @@ -68,6 +75,8 @@ private: CHUNK, ENTITY, HUD, + OUTLINE_WORLD, + OUTLINE_HUD, SPRITE, } active_prog;