|
RenderEngine
|
#include <MTLShader.hpp>
Public Member Functions | |
| MTLShader () | |
| Default constructor. | |
| MTLShader (std::string vertexshaderName, std::string fragmentshaderName) | |
| Constructor. | |
| MTLShader (std::string shaderName) | |
| Constructor. | |
| ~MTLShader () | |
| Destructor. | |
| void | setUpShaderParameters () |
| setUpShaderParameters | |
| void | setTexture (Texture *texture) |
| setUpSsetTexturehaderParameters | |
| void | setLightPos (glm::vec3 lightPos) |
| setLightPos | |
| void | setDiffuse (glm::vec3 diffuse) |
| setDiffuse | |
| void | setAmbient (glm::vec3 ambient) |
| setAmbient | |
| void | setSpecular (glm::vec3 specular) |
| setSpecular | |
| void | setOpacity (float opacity) |
| setOpacity | |
| void | bind () |
| bind | |
Public Member Functions inherited from Shader | |
| 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 | |
Additional Inherited Members | |
Protected Attributes inherited from Shader | |
| 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 | |
| MTLShader::MTLShader | ( | ) |
Default constructor.
Setup default shader.
| MTLShader::MTLShader | ( | std::string | vertexshaderName, |
| std::string | fragmentshaderName | ||
| ) |
Constructor.
Version of constructor that allows for vertex and fragment shader with differnt names
| MTLShader::MTLShader | ( | std::string | shaderName | ) |
Constructor.
Version of constructor that assumes that vertex and fragment shader have same names
| MTLShader::~MTLShader | ( | ) |
Destructor.
Clean up ressources
|
virtual |
| void MTLShader::setAmbient | ( | glm::vec3 | ambient | ) |
setAmbient
Set the ambient color
| void MTLShader::setDiffuse | ( | glm::vec3 | diffuse | ) |
setDiffuse
Set the diffuse color
| void MTLShader::setLightPos | ( | glm::vec3 | lightPos | ) |
setLightPos
Set the position of the light source.
| void MTLShader::setOpacity | ( | float | opacity | ) |
setOpacity
Set amount of opacity
| void MTLShader::setSpecular | ( | glm::vec3 | specular | ) |
setSpecular
Set the specular color
| void MTLShader::setTexture | ( | Texture * | texture | ) |
setUpSsetTexturehaderParameters
Set up all shader parameters
| void MTLShader::setUpShaderParameters | ( | ) |
setUpShaderParameters
Set up all shader parameters