X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FPlainColor.hpp;fp=src%2Fgraphics%2FPlainColor.hpp;h=0000000000000000000000000000000000000000;hb=fd08d1defb5c42d2847a9001e1921898e3d526bf;hp=534218b3be456024961644568371fbb18d6ed6c6;hpb=ab817024b3c02a54a376fa8f60b5046e51128ebb;p=blobs.git diff --git a/src/graphics/PlainColor.hpp b/src/graphics/PlainColor.hpp deleted file mode 100644 index 534218b..0000000 --- a/src/graphics/PlainColor.hpp +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef BLOBS_GRAPHICS_PLAINCOLOR_HPP_ -#define BLOBS_GRAPHICS_PLAINCOLOR_HPP_ - -#include "Program.hpp" -#include "SimpleVAO.hpp" - -#include "glm.hpp" - -#include - - -namespace blobs { -namespace graphics { - -class PlainColor { - -public: - PlainColor(); - ~PlainColor(); - - PlainColor(const PlainColor &) = delete; - PlainColor &operator =(const PlainColor &) = delete; - - PlainColor(PlainColor &&) = delete; - PlainColor &operator =(PlainColor &&) = delete; - -public: - void Activate() noexcept; - - void SetM(const glm::mat4 &m) noexcept; - void SetVP(const glm::mat4 &v, const glm::mat4 &p) noexcept; - void SetMVP(const glm::mat4 &m, const glm::mat4 &v, const glm::mat4 &p) noexcept; - void SetColor(const glm::vec4 &color) noexcept; - - const glm::mat4 &M() const noexcept { return m; } - const glm::mat4 &V() const noexcept { return v; } - const glm::mat4 &P() const noexcept { return p; } - const glm::mat4 &MV() const noexcept { return mv; } - const glm::mat4 &MVP() const noexcept { return mvp; } - - void DrawRect() const noexcept; - void OutlineRect() const noexcept; - -private: - struct Attributes { - glm::vec3 position; - }; - SimpleVAO vao; - Program prog; - - glm::mat4 m; - glm::mat4 v; - glm::mat4 p; - glm::mat4 mv; - glm::mat4 mvp; - - GLuint m_handle; - GLuint mv_handle; - GLuint mvp_handle; - - GLuint fg_color_handle; - -}; - -} -} - -#endif