1 #ifndef BLOBS_GRAPHICS_PROGRAM_HPP_
2 #define BLOBS_GRAPHICS_PROGRAM_HPP_
23 Program(const Program &) = delete;
24 Program &operator =(const Program &) = delete;
26 const Shader &LoadShader(GLenum type, const GLchar *src);
27 void Attach(Shader &) noexcept;
29 bool Linked() const noexcept;
30 void Log(std::ostream &) const;
32 GLint AttributeLocation(const GLchar *name) const noexcept;
33 GLint AttributeLocation(const std::string &name) const noexcept;
34 GLint UniformLocation(const GLchar *name) const noexcept;
35 GLint UniformLocation(const std::string &name) const noexcept;
37 void Uniform(GLint, GLint) noexcept;
38 void Uniform(GLint, float) noexcept;
39 void Uniform(GLint, const glm::vec3 &) noexcept;
40 void Uniform(GLint, const glm::vec4 &) noexcept;
41 void Uniform(GLint, const glm::mat4 &) noexcept;
43 void Use() const noexcept { glUseProgram(handle); }
47 std::list<Shader> shaders;