]> git.localhorst.tv Git - gong.git/blob - src/graphics/SkyBoxShader.hpp
code, assets, and other stuff stolen from blank
[gong.git] / src / graphics / SkyBoxShader.hpp
1 #ifndef GONG_GRAPHICS_SKYBOXSHADER_HPP_
2 #define GONG_GRAPHICS_SKYBOXSHADER_HPP_
3
4 #include "CubeMap.hpp"
5
6
7 namespace gong {
8 namespace graphics {
9
10 class SkyBoxShader {
11
12 public:
13         SkyBoxShader();
14
15         void Activate() noexcept;
16
17         void SetTexture(CubeMap &) noexcept;
18
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
23         const glm::mat4 &Projection() const noexcept { return projection; }
24         const glm::mat4 &View() const noexcept { return view; }
25         const glm::mat4 &GetVP() const noexcept { return vp; }
26
27 private:
28         Program program;
29
30         glm::mat4 projection;
31         glm::mat4 view;
32         glm::mat4 vp;
33
34         GLuint vp_handle;
35         GLuint sampler_handle;
36
37 };
38
39 }
40 }
41
42 #endif