]> git.localhorst.tv Git - blank.git/blob - src/graphics/PlainColor.hpp
cfaaebe058c5929ffb6c65c1d7b8cbcb021edd10
[blank.git] / src / graphics / PlainColor.hpp
1 #ifndef BLANK_GRAPHICS_PLAINCOLOR_HPP_
2 #define BLANK_GRAPHICS_PLAINCOLOR_HPP_
3
4 #include "Program.hpp"
5
6 #include <GL/glew.h>
7 #include <glm/glm.hpp>
8
9
10 namespace blank {
11
12 class PlainColor {
13
14 public:
15         PlainColor();
16
17         void Activate() noexcept;
18
19         void SetM(const glm::mat4 &m) noexcept;
20         void SetProjection(const glm::mat4 &p) noexcept;
21         void SetView(const glm::mat4 &v) noexcept;
22         void SetVP(const glm::mat4 &v, const glm::mat4 &p) noexcept;
23         void SetMVP(const glm::mat4 &m, const glm::mat4 &v, const glm::mat4 &p) noexcept;
24
25         const glm::mat4 &Projection() const noexcept { return projection; }
26         const glm::mat4 &View() const noexcept { return view; }
27         const glm::mat4 &GetVP() const noexcept { return vp; }
28
29 private:
30         Program program;
31
32         glm::mat4 projection;
33         glm::mat4 view;
34         glm::mat4 vp;
35
36         GLuint mvp_handle;
37
38 };
39
40 }
41
42 #endif