#ifndef SHADER_INCLUDED_H #define SHADER_INCLUDED_H #include #include #include #include #include class Location; class Shader { public: enum class Program { Basic = 0, Water = 1, LandMass = 2, StaticPos = 3 }; Shader(); void setView(glm::mat4 view) const; void setModel(const Location &, Program = Program::Basic) const; void setUniform(const GLchar *, glm::vec3 dir) const; private: class ProgramHandle { public: ProgramHandle(GLuint, GLuint); using ProgramRef = glRef; ProgramRef m_program; GLint viewProjection_uniform, model_uniform; }; std::array programs; }; #endif