RenderEngine
Loading...
Searching...
No Matches
BasicMaterialShader Class Reference

BasicMaterialShader. More...

#include <BasicMaterialShader.hpp>

Inheritance diagram for BasicMaterialShader:
Shader

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
 

Detailed Description

BasicMaterialShader.

Class for a shader supporting a basic phong shading

Constructor & Destructor Documentation

◆ BasicMaterialShader() [1/3]

BasicMaterialShader::BasicMaterialShader ( )

Default constructor.

Does nothing - don't use.

◆ BasicMaterialShader() [2/3]

BasicMaterialShader::BasicMaterialShader ( std::string  vertexshaderName,
std::string  fragmentshaderName 
)

BasicMaterialShader constructor.

Version of constructor that allows for vertex and fragment shader with different names.

◆ BasicMaterialShader() [3/3]

BasicMaterialShader::BasicMaterialShader ( std::string  shaderName)

BasicMaterialShader constructor.

Version of constructor that assumes that vertex and fragment shader have same name

◆ ~BasicMaterialShader()

BasicMaterialShader::~BasicMaterialShader ( )

Destructor.

Clean up ressources

Member Function Documentation

◆ bind()

void BasicMaterialShader::bind ( )
virtual

bind

Bind the shader.

Reimplemented from Shader.

◆ init()

void BasicMaterialShader::init ( )

init

Init shader

◆ setLightPos()

void BasicMaterialShader::setLightPos ( glm::vec3  lightPos)

setLightPos

Set the light's position.

◆ setTexture()

void BasicMaterialShader::setTexture ( Texture texture)

setTexture

Set a reference to the texture.


The documentation for this class was generated from the following files: