14 #ifndef GK_SHADER_HPP_ 15 #define GK_SHADER_HPP_ 20 #include <glm/glm.hpp> 31 Shader(
const std::string &vertexFilename,
const std::string &fragementFilename);
34 void loadFromFile(
const std::string &vertexFilename,
const std::string &fragementFilename);
39 void addShader(GLenum type,
const std::string &filename);
41 GLint
attrib(
const std::string &name)
const;
42 GLint
uniform(
const std::string &name)
const;
47 void setUniform(
const std::string &name,
int n)
const;
48 void setUniform(
const std::string &name,
float x,
float y)
const;
49 void setUniform(
const std::string &name,
const glm::mat4 &matrix)
const;
65 #endif // GK_SHADER_HPP_
void enableVertexAttribArray(const std::string &name) const
void disableVertexAttribArray(const std::string &name) const
static void bind(const Shader *shader)
std::vector< GLuint > m_fragmentShaders
void loadFromFile(const std::string &vertexFilename, const std::string &fragementFilename)
void addShader(GLenum type, const std::string &filename)
GLint attrib(const std::string &name) const
std::vector< GLuint > m_vertexShaders
void setUniform(const std::string &name, int n) const
GLint uniform(const std::string &name) const