X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FPlanetSurface.hpp;h=2482703b070b8eff0fe4e07409933b0b852afb92;hb=cacc0641e5174d8b46e7a7086be6a45c87ab3642;hp=2e73fbc1542e113a60eb95a1c0a6239011b06b28;hpb=be413456f57da06e918ae7bf4c4f35e5198ff7ce;p=blobs.git diff --git a/src/graphics/PlanetSurface.hpp b/src/graphics/PlanetSurface.hpp index 2e73fbc..2482703 100644 --- a/src/graphics/PlanetSurface.hpp +++ b/src/graphics/PlanetSurface.hpp @@ -3,6 +3,8 @@ #include "Program.hpp" +#include "glm.hpp" + namespace blobs { namespace graphics { @@ -27,16 +29,33 @@ public: void SetMVP(const glm::mat4 &m, const glm::mat4 &v, const glm::mat4 &p) noexcept; void SetNormal(const glm::vec3 &) noexcept; void SetTexture(ArrayTexture &) noexcept; + void SetLight(const glm::vec3 &pos, const glm::vec3 &color, float strength) noexcept; + + const glm::mat4 &M() const noexcept { return m; } + const glm::mat4 &V() const noexcept { return v; } + const glm::mat4 &P() const noexcept { return p; } + const glm::mat4 &MV() const noexcept { return mv; } + const glm::mat4 &MVP() const noexcept { return mvp; } private: Program prog; + glm::mat4 m; + glm::mat4 v; + glm::mat4 p; + glm::mat4 mv; + glm::mat4 mvp; + GLuint m_handle; GLuint mv_handle; GLuint mvp_handle; GLuint sampler_handle; GLuint normal_handle; + GLuint light_position_handle; + GLuint light_color_handle; + GLuint light_strength_handle; + }; }