Creates a Shader from an text file, this can then be used with OpenGL.
More...
#include <Shader.h>
Creates a Shader from an text file, this can then be used with OpenGL.
◆ Shader()
| Shader::Shader |
( |
std::string |
vertexShaderFileName, |
|
|
std::string |
fragmentShaderFileName |
|
) |
| |
Creates a Shader Object using an shader file location and OpenGL.
- Parameters
-
| vertexShaderFileName | The name of the vertex shader file. |
| fragmentShaderFileName | The name of the fragment shader file. |
◆ ~Shader()
◆ CheckShaderCompiled()
| bool Shader::CheckShaderCompiled |
( |
GLint |
shader | ) |
|
|
private |
A function to test if the shader compiled successfully.
- Parameters
-
| shader | The shader to test. |
- Returns
- If the shader compiled successfully.
◆ getModelMatrixLocation()
| GLint Shader::getModelMatrixLocation |
( |
| ) |
|
Returns the shader model matrix location.
- Returns
- The shader model matrix location.
◆ getShaderProgram()
| GLuint Shader::getShaderProgram |
( |
| ) |
|
Returns the shader program.
- Returns
- The shader program.
◆ getShaderProjectionMatrixLocation()
| GLint Shader::getShaderProjectionMatrixLocation |
( |
| ) |
|
Returns the shader projection matrix location.
- Returns
- The shader projection matrix location.
◆ getTextureSamplerLocation()
| GLint Shader::getTextureSamplerLocation |
( |
| ) |
|
Returns the texture sampler location.
- Returns
- The texture sampler location.
◆ getViewMatrixLocation()
| GLint Shader::getViewMatrixLocation |
( |
| ) |
|
Returns the shader view matrix location.
- Returns
- The shader view matrix location.
◆ initaliseShader()
| void Shader::initaliseShader |
( |
std::string |
shaderFileName, |
|
|
char |
shaderType |
|
) |
| |
|
private |
Initialise a shader.
- Parameters
-
| shaderFileName | The name of the shader file. |
| shaderType | The type of the shader. |
◆ shaderModelMatrixLocation
| GLint Shader::shaderModelMatrixLocation |
|
private |
The Uniform locations for the shader program.
◆ shaderProgram
| GLuint Shader::shaderProgram |
|
private |
◆ shaderProjectionMatrixLocation
| GLint Shader::shaderProjectionMatrixLocation |
|
private |
◆ shaderViewMatrixLocation
| GLint Shader::shaderViewMatrixLocation |
|
private |
◆ textureSamplerLocation
| GLint Shader::textureSamplerLocation |
|
private |
The documentation for this class was generated from the following files: