Creates a Shader for use with OpenGL. Creates a Shader from an text file, this can then be used with OpenGL. More...
#include <Shader.h>

Public Member Functions | |
| Shader (std::string vertexShaderFileName, std::string fragmentShaderFileName) | |
| ~Shader () | |
| GLuint | getShaderProgram () |
| GLint | getModelMatrixLocation () |
| GLint | getViewMatrixLocation () |
| GLint | getShaderProjectionMatrixLocation () |
| GLint | getTextureSamplerLocation () |
Private Member Functions | |
| bool | CheckShaderCompiled (GLint shader) |
| void | initaliseShader (std::string shaderFileName, char shaderType) |
Private Attributes | |
| GLuint | shaderProgram |
| GLint | shaderModelMatrixLocation |
| GLint | shaderViewMatrixLocation |
| GLint | shaderProjectionMatrixLocation |
| GLint | textureSamplerLocation |
Creates a Shader for use with OpenGL. Creates a Shader from an text file, this can then be used with OpenGL.
| Shader::Shader | ( | std::string | vertexShaderFileName, |
| std::string | fragmentShaderFileName | ||
| ) |
| Shader::~Shader | ( | ) |
|
private |
A function to test if the shader compiled successfully.
| shader | The shader to test. |

| GLint Shader::getModelMatrixLocation | ( | ) |
Getter # Returns the shader model matrix location.
| GLuint Shader::getShaderProgram | ( | ) |
Getter # Returns the shader program.

| GLint Shader::getShaderProjectionMatrixLocation | ( | ) |
Getter # Returns the shader projection matrix location.
| GLint Shader::getTextureSamplerLocation | ( | ) |
Getter # Returns the texture sampler location.

| GLint Shader::getViewMatrixLocation | ( | ) |
Getter # Returns the shader view matrix location.
|
private |
Initialise a shader.
| shaderFileName | The name of the shader file. |
| shaderType | The type of the shader. |


|
private |
The Uniform locations for the shader program
|
private |
|
private |
|
private |
1.8.8