Encapsulates an OpenGL shader program, handling compilation, linking, and usage. More...
#include <Shader.h>
Public Member Functions | |
Shader (const std::string &vertexPath, const std::string &fragmentPath) | |
~Shader () | |
void | Bind () const |
void | Unbind () const |
void | SetUniformMat4 (const std::string &name, const float *matrix) const |
void | SetUniform3f (const std::string &name, float x, float y, float z) const |
void | SetUniform1f (const std::string &name, float value) const |
Encapsulates an OpenGL shader program, handling compilation, linking, and usage.
The Shader class provides functionality to load, compile, and link vertex and fragment shaders, as well as to bind and unbind the resulting shader program for rendering.
Shader::Shader | ( | const std::string & | vertexPath, |
const std::string & | fragmentPath | ||
) |
Shader::~Shader | ( | ) |
void Shader::Bind | ( | ) | const |
void Shader::SetUniform1f | ( | const std::string & | name, |
float | value | ||
) | const |
void Shader::SetUniform3f | ( | const std::string & | name, |
float | x, | ||
float | y, | ||
float | z | ||
) | const |
void Shader::SetUniformMat4 | ( | const std::string & | name, |
const float * | matrix | ||
) | const |
void Shader::Unbind | ( | ) | const |