Shader.
More...
#include <Shader.hpp>
|
| | Shader () |
| | Default constructor.
|
| |
| | Shader (std::string vertexshaderName, std::string fragmentshaderName) |
| | Constructor with shader source specification.
|
| |
| | Shader (std::string shaderName) |
| | Constructor with shader source specification.
|
| |
| virtual | ~Shader () |
| | Destructor.
|
| |
| GLuint | LoadShaders (const char *vertex_file_path, const char *fragment_file_path) |
| | LoadShaders.
|
| |
| void | initShaders (std::string vertexshaderName, std::string fragmentshaderName) |
| | initShaders
|
| |
| void | updateMatrices (glm::mat4 MVP, glm::mat4 M, glm::mat4 V) |
| | updateMatrices
|
| |
| void | updateMVP (glm::mat4 MVP) |
| | updateMVP
|
| |
| virtual void | bind () |
| | bind
|
| |
|
| GLuint | programID |
| |
| GLuint | m_MVPID |
| | all shader should get information about the MVP matrix
|
| |
| GLuint | m_VID |
| | all shader should get information about the view matrix
|
| |
| GLuint | m_MID |
| | all shader should get information about the model matrix
|
| |
Shader.
Shader implementation. Contains all the required function calls like create shaders, compile shaders.
◆ Shader() [1/3]
Default constructor.
Does nothing at the moment
◆ Shader() [2/3]
| Shader::Shader |
( |
std::string |
vertexshaderName, |
|
|
std::string |
fragmentshaderName |
|
) |
| |
|
inline |
Constructor with shader source specification.
Creates the shaders from source, creates vertex and fragment shader at the same time. Uses different source file naming conventions
◆ Shader() [3/3]
| Shader::Shader |
( |
std::string |
shaderName | ) |
|
|
inline |
Constructor with shader source specification.
Creates the shaders from source, creates vertex and fragment shader at the same time. Assumes that fragment and vertex shader have the same names
◆ ~Shader()
Destructor.
Virtual - write own destructor for each shader implementation
◆ bind()
◆ initShaders()
| void Shader::initShaders |
( |
std::string |
vertexshaderName, |
|
|
std::string |
fragmentshaderName |
|
) |
| |
◆ LoadShaders()
| GLuint Shader::LoadShaders |
( |
const char * |
vertex_file_path, |
|
|
const char * |
fragment_file_path |
|
) |
| |
LoadShaders.
Does the actual shader loading and compiling
◆ updateMatrices()
| void Shader::updateMatrices |
( |
glm::mat4 |
MVP, |
|
|
glm::mat4 |
M, |
|
|
glm::mat4 |
V |
|
) |
| |
updateMatrices
Updates the values for the model-view projection matrix and the model and view matrix separately
◆ updateMVP()
| void Shader::updateMVP |
( |
glm::mat4 |
MVP | ) |
|
updateMVP
Updates the values for the model-view projection matrix
◆ m_MID
all shader should get information about the model matrix
◆ m_MVPID
all shader should get information about the MVP matrix
◆ m_VID
all shader should get information about the view matrix
◆ programID
The documentation for this class was generated from the following files: