4 #include <unordered_map> 18 Shader(std::string vertexShaderFileName, std::string fragmentShaderFileName);
48 std::unordered_map<std::string, GLint>
uniforms;
GLuint getShaderProgram()
Returns the shader program.
Definition: Shader.cpp:116
~Shader()
Destructs the Shader Object deleting the Shader Object from memory.
Definition: Shader.cpp:40
void initaliseShader(std::string shaderFileName, char shaderType)
Initialise a shader.
Definition: Shader.cpp:44
void initaliseUniform(std::string uniformID)
Initalise a uniform for the shader.
Definition: Shader.cpp:122
bool CheckShaderCompiled(GLint shader)
A function to test if the shader compiled successfully.
Definition: Shader.cpp:90
Creates a Shader from an text file, this can then be used with OpenGL.
Definition: Shader.h:10
std::unordered_map< std::string, GLint > uniforms
The Uniform locations for the shader program.
Definition: Shader.h:48
GLuint shaderProgram
The Shader program of the Shader Object.
Definition: Shader.h:46
GLint getUniform(std::string uniformID)
Returns the requested uniform location.
Definition: Shader.cpp:137
Shader(std::string vertexShaderFileName, std::string fragmentShaderFileName)
Creates a Shader Object using an shader file location and OpenGL.
Definition: Shader.cpp:6