X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FSkyBoxShader.hpp;fp=src%2Fgraphics%2FSkyBoxShader.hpp;h=752298e816b258384e02230d454fe9c0b5c9d11f;hb=8ab4ea13545cccbacbd1ed610968d3f481c1b3c8;hp=0000000000000000000000000000000000000000;hpb=be3a81656b8493010d2329fa00da617e24293438;p=blank.git diff --git a/src/graphics/SkyBoxShader.hpp b/src/graphics/SkyBoxShader.hpp new file mode 100644 index 0000000..752298e --- /dev/null +++ b/src/graphics/SkyBoxShader.hpp @@ -0,0 +1,44 @@ +#ifndef BLANK_GRAPHICS_SKYBOXSHADER_HPP_ +#define BLANK_GRAPHICS_SKYBOXSHADER_HPP_ + +#include "CubeMap.hpp" + + +namespace blank { + +class SkyBoxShader { + +public: + SkyBoxShader(); + + void Activate() noexcept; + + void SetTexture(CubeMap &) 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 m_handle; + GLuint mv_handle; + GLuint mvp_handle; + GLuint sampler_handle; + +}; + +} + +#endif