X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fshader.hpp;h=97211c4aa6799860eb7f748c838369800d680f7d;hb=5588a6a9b1e2fb6fee8f1166f855ef497e551a09;hp=aefcffe1f8b54e819f92eb895e3cebfcba9f6cf0;hpb=b314df303ffedbd6d2e81872908d12fc9712801a;p=blank.git diff --git a/src/shader.hpp b/src/shader.hpp index aefcffe..97211c4 100644 --- a/src/shader.hpp +++ b/src/shader.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace blank { @@ -58,6 +59,35 @@ private: }; + +class DirectionalLighting { + +public: + DirectionalLighting(); + + void Activate(); + + void SetLightDirection(const glm::vec3 &); + + 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