6 #include <OpenGL/gl3.h>
19 unsigned int program_object;
20 std::map<std::string, int> name_to_location;
21 std::map<std::string, GLenum> name_to_type;
32 Shader(
const unsigned int vertex_program,
const unsigned int fragment_program,
const unsigned int geometry_program = 0);
64 void setName(
const std::string& name);
70 std::string
getName()
const noexcept;
88 void setUniform(
const std::string& name,
const T& value);
Class for shader.
Definition: shader.h:17
std::vector< std::string > getUniformNames() const noexcept
Gets the uniform names.
Definition: shader.cpp:74
void setUniform(const Uniform &uniform)
Sets the uniform.
Definition: shader.cpp:411
void setName(const std::string &name)
Sets the name.
Definition: shader.cpp:493
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: shader.cpp:500
unsigned int getHandle() const noexcept
Gets the shader's opengl handle.
Definition: shader.cpp:63
void useProgram() const
Tell open gl to use this shader.
Definition: shader.cpp:67
std::string getName() const noexcept
Gets the name.
Definition: shader.cpp:497