SuzanneIsland: An island of Real-time rendering effects!
|
#include <shader.h>
Public Member Functions | |
Shader (const std::string &vertexShader, const std::string &fragmentShader) | |
void | useShader () const |
Set this as the active shader program. More... | |
GLint | getUniformLocation (const std::string &name) |
Return location of shader uniform if value not yet cached it is retrieved via glGetUniformLocation glGetUniformLocation should not be called every frame since it involves expensive string search! | |
Data Fields | |
GLuint | programHandle |
Shader class.
This loads and compiles glsl shader files and creates a linked shader program. The program can later be activated when needed.
void Shader::useShader | ( | ) | const |
Set this as the active shader program.
Only one shader program can be active at a time in the current opengl context.