12 #include <glad/glad.h>
13 #include <glm/glm.hpp>
23 Shader(std::string
const &vertex_path, std::string
const &fragment_path);
35 void setUniform(std::string
const &name,
int value)
const;
36 void setUniform(std::string
const &name,
float value)
const;
37 void setUniform(std::string
const &name,
const glm::mat4 &matrix)
const;
41 GLuint program_id_ = 0;
43 GLint getUniformLocation(std::string
const &uniform_name)
const;
44 void errorCheck(GLuint shader, std::string
const &shader_type)
const;
Shader & operator=(const Shader &)=delete
void setUniform(std::string const &name, int value) const
set uniforms of different type
Definition: shader.cpp:88
~Shader()
Definition: shader.cpp:75
void use() const
compiles vertex and fragment shader
Definition: shader.cpp:83
Shader(std::string const &vertex_path, std::string const &fragment_path)
Definition: shader.cpp:23