|
RenderEngine
|
#include <BasicMaterialShader.hpp>
Public Member Functions | |
| BasicMaterialShader () | |
| Default constructor. | |
| BasicMaterialShader (std::string vertexshaderName, std::string fragmentshaderName) | |
| BasicMaterialShader constructor. | |
| BasicMaterialShader (std::string shaderName) | |
| BasicMaterialShader constructor. | |
| ~BasicMaterialShader () | |
| Destructor. | |
| void | init () |
| init | |
| void | setTexture (Texture *texture) |
| setTexture | |
| void | setLightPos (glm::vec3 lightPos) |
| setLightPos | |
| 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 | |
Class for a shader supporting a basic phong shading
| BasicMaterialShader::BasicMaterialShader | ( | ) |
Default constructor.
Does nothing - don't use.
| BasicMaterialShader::BasicMaterialShader | ( | std::string | vertexshaderName, |
| std::string | fragmentshaderName | ||
| ) |
BasicMaterialShader constructor.
Version of constructor that allows for vertex and fragment shader with different names.
| BasicMaterialShader::BasicMaterialShader | ( | std::string | shaderName | ) |
BasicMaterialShader constructor.
Version of constructor that assumes that vertex and fragment shader have same name
| BasicMaterialShader::~BasicMaterialShader | ( | ) |
Destructor.
Clean up ressources
|
virtual |
| void BasicMaterialShader::init | ( | ) |
init
Init shader
| void BasicMaterialShader::setLightPos | ( | glm::vec3 | lightPos | ) |
setLightPos
Set the light's position.
| void BasicMaterialShader::setTexture | ( | Texture * | texture | ) |
setTexture
Set a reference to the texture.