1 #ifndef GONG_GRAPHICS_PROGRAM_HPP_
2 #define GONG_GRAPHICS_PROGRAM_HPP_
22 Program(const Program &) = delete;
23 Program &operator =(const Program &) = delete;
25 const Shader &LoadShader(GLenum type, const GLchar *src);
26 void Attach(Shader &) noexcept;
28 bool Linked() const noexcept;
29 void Log(std::ostream &) const;
31 GLint AttributeLocation(const GLchar *name) const noexcept;
32 GLint UniformLocation(const GLchar *name) const noexcept;
34 void Uniform(GLint, GLint) noexcept;
35 void Uniform(GLint, float) noexcept;
36 void Uniform(GLint, const glm::vec3 &) noexcept;
37 void Uniform(GLint, const glm::vec4 &) noexcept;
38 void Uniform(GLint, const glm::mat4 &) noexcept;
40 void Use() const noexcept { glUseProgram(handle); }
44 std::list<Shader> shaders;