#define BLANK_SHADER_HPP_
#include <iosfwd>
+#include <list>
#include <GL/glew.h>
+#include <glm/glm.hpp>
namespace blank {
Program(const Program &) = delete;
Program &operator =(const Program &) = delete;
+ const Shader &LoadShader(GLenum type, const GLchar *src);
void Attach(Shader &);
void Link();
bool Linked() const;
private:
GLuint handle;
+ std::list<Shader> shaders;
+
+};
+
+
+class DirectionalLighting {
+
+public:
+ DirectionalLighting();
+
+ void Activate();
+
+ void SetLightDirection(const glm::vec3 &);
+
+ void SetM(const glm::mat4 &m);
+ void SetProjection(const glm::mat4 &p);
+ void SetView(const glm::mat4 &v);
+ 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 projection;
+ glm::mat4 view;
+ glm::mat4 vp;
+
+ GLuint m_handle;
+ GLuint mvp_handle;
+ GLuint light_direction_handle;
+ GLuint light_color_handle;
};