X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fshader.hpp;fp=src%2Fshader.hpp;h=c97e073111b9cf45a4dacf7f63dd620012d98d5c;hb=982b69ce8c393ae18beed5239191b8bc2ee1d5d1;hp=aefcffe1f8b54e819f92eb895e3cebfcba9f6cf0;hpb=5700ea3c08ea5e4a5c743f0413b65dc8eebfd220;p=blank.git diff --git a/src/shader.hpp b/src/shader.hpp index aefcffe..c97e073 100644 --- a/src/shader.hpp +++ b/src/shader.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace blank { @@ -58,6 +59,33 @@ private: }; + +class DirectionalLighting { + +public: + DirectionalLighting(); + + void Activate(); + + void SetM(const glm::mat4 &m); + void SetVP(const glm::mat4 &v, const glm::mat4 &p); + void SetMVP(const glm::mat4 &m, const glm::mat4 &v, const glm::mat4 &p); + +private: + Program program; + + glm::vec3 light_direction; + glm::vec3 light_color; + + glm::mat4 vp; + + GLuint m_handle; + GLuint mvp_handle; + GLuint light_direction_handle; + GLuint light_color_handle; + +}; + } #endif