VisPro  1.0
Project of Visualisierung 2
Shader Class Reference

#include <Shader.h>

Inheritance diagram for Shader:
BlinnPhongShader FboShader NormalShader QuadShader TextureShader ZBufferShader AnimatedTextureShader

Public Member Functions

 Shader (const std::string &vertexShader, const std::string &fragmentShader)
 
 Shader (const std::string &vertexShader, const std::string &geometryShader, const std::string &fragmentShader)
 
void useShader () const
 
virtual void setLighting (std::vector< std::shared_ptr< PointLight >> *allLights)
 
void setCutawayDimension (glm::vec2 dim)
 
virtual void bindTexture (int unit)
 

Public Attributes

GLuint programHandle
 

Detailed Description

Shader base class.

Constructor & Destructor Documentation

Shader::Shader ( const std::string &  vertexShader,
const std::string &  fragmentShader 
)

Constructor.

Parameters
vertexShadervertex shader file
fragmentShaderfragment shader file
Shader::Shader ( const std::string &  vertexShader,
const std::string &  geometryShader,
const std::string &  fragmentShader 
)

Constructor.

Parameters
vertexShadervertex shader file
geometryShadergeometry shader file
fragmentShaderfragment shader file

Member Function Documentation

void Shader::bindTexture ( int  unit)
virtual

Bind given texture unit in given context.

Parameters
unittexture unit identifier

Reimplemented in TextureShader, FboShader, and AnimatedTextureShader.

void Shader::setCutawayDimension ( glm::vec2  dim)

Set screen coordinate dimension of cutaway surface plane in shader.

Parameters
dim2D vector of cutaway surface plane dimension
void Shader::setLighting ( std::vector< std::shared_ptr< PointLight >> *  allLights)
virtual

Install shader and set lighting.

Parameters
allLightsset of given point lights

Reimplemented in BlinnPhongShader, FboShader, and NormalShader.

void Shader::useShader ( ) const

Installs given GLSL program.

Member Data Documentation

GLuint Shader::programHandle

Program handle that contains all given shaders.


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