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