X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fgraphics%2FSkyBox.hpp;fp=src%2Fgraphics%2FSkyBox.hpp;h=8326c64adef4497bc9a997135e4a40df6a7844a6;hp=0000000000000000000000000000000000000000;hb=ea55fc457b7d0068225af447da4a5c5489ccd239;hpb=7159e493b63552ec7de1fceec4abcb7e0e099ec0 diff --git a/src/graphics/SkyBox.hpp b/src/graphics/SkyBox.hpp new file mode 100644 index 0000000..8326c64 --- /dev/null +++ b/src/graphics/SkyBox.hpp @@ -0,0 +1,58 @@ +#ifndef BLOBS_GRAPHICS_SKYBOX_HPP_ +#define BLOBS_GRAPHICS_SKYBOX_HPP_ + +#include "Program.hpp" +#include "SimpleVAO.hpp" + +#include + + +namespace blobs { +namespace graphics { + +class CubeMap; + +class SkyBox { + +public: + SkyBox(); + ~SkyBox(); + + SkyBox(const SkyBox &) = delete; + SkyBox &operator =(const SkyBox &) = delete; + + SkyBox(SkyBox &&) = delete; + SkyBox &operator =(SkyBox &&) = delete; + +public: + void Activate() noexcept; + + void SetV(const glm::mat4 &v) noexcept; + void SetP(const glm::mat4 &p) noexcept; + void SetVP(const glm::mat4 &v, const glm::mat4 &p) noexcept; + void SetTexture(CubeMap &) noexcept; + + const glm::mat4 &V() const noexcept { return v; } + const glm::mat4 &P() const noexcept { return p; } + const glm::mat4 &VP() const noexcept { return vp; } + + void Draw() const noexcept; + +private: + Program prog; + + glm::mat4 v; + glm::mat4 p; + glm::mat4 vp; + + GLuint vp_handle; + GLuint sampler_handle; + + SimpleVAO vao; + +}; + +} +} + +#endif