X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FPlainColor.hpp;fp=src%2Fgraphics%2FPlainColor.hpp;h=cfaaebe058c5929ffb6c65c1d7b8cbcb021edd10;hb=a32b120a2c06d3c7ad6a217bc46bba9e76d75d93;hp=0000000000000000000000000000000000000000;hpb=4f93c2526b82132ee695949779775b5e7abc7d4d;p=blank.git diff --git a/src/graphics/PlainColor.hpp b/src/graphics/PlainColor.hpp new file mode 100644 index 0000000..cfaaebe --- /dev/null +++ b/src/graphics/PlainColor.hpp @@ -0,0 +1,42 @@ +#ifndef BLANK_GRAPHICS_PLAINCOLOR_HPP_ +#define BLANK_GRAPHICS_PLAINCOLOR_HPP_ + +#include "Program.hpp" + +#include +#include + + +namespace blank { + +class PlainColor { + +public: + PlainColor(); + + void Activate() noexcept; + + void SetM(const glm::mat4 &m) noexcept; + void SetProjection(const glm::mat4 &p) noexcept; + void SetView(const glm::mat4 &v) 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; + + const glm::mat4 &Projection() const noexcept { return projection; } + const glm::mat4 &View() const noexcept { return view; } + const glm::mat4 &GetVP() const noexcept { return vp; } + +private: + Program program; + + glm::mat4 projection; + glm::mat4 view; + glm::mat4 vp; + + GLuint mvp_handle; + +}; + +} + +#endif