Face3d
Face3D::ShaderLoader Class Reference

#include <ShaderLoader.hpp>

Public Member Functions

GLuint getProgram (const std::string &shaderClassName)
 get shader program More...
 
GLuint loadShader (const std::string &shaderClassName, GLenum shaderType)
 
void deleteShader (const GLuint shaderID)
 
GLuint createProgram ()
 
void linkProgram (const GLuint programID)
 
void attachShader (const GLuint programID, const GLuint shaderID)
 
void checkProgram (const GLuint programID)
 
void addToCache (const GLuint programID, const std::string &shaderProgramName)
 

Static Public Member Functions

static ShaderLoaderInstance ()
 get instance More...
 

Private Member Functions

 ShaderLoader ()
 
GLuint loadVertexAndFragmentShader (const std::string &shaderClassName)
 
std::string readInShaderCode (const std::string &pathToShaderFile)
 
void compileShader (GLuint shaderID, const std::string &shaderCode)
 
void checkShader (GLuint shaderID, GLint result)
 

Private Attributes

std::map< std::string, GLuint > m_ShaderProgramMap
 

Detailed Description

singleton class to load shaders and compile them

Constructor & Destructor Documentation

Face3D::ShaderLoader::ShaderLoader ( )
inlineprivate

Member Function Documentation

void Face3D::ShaderLoader::addToCache ( const GLuint  programID,
const std::string &  shaderProgramName 
)
void Face3D::ShaderLoader::attachShader ( const GLuint  programID,
const GLuint  shaderID 
)
void Face3D::ShaderLoader::checkProgram ( const GLuint  programID)
void Face3D::ShaderLoader::checkShader ( GLuint  shaderID,
GLint  result 
)
private
void Face3D::ShaderLoader::compileShader ( GLuint  shaderID,
const std::string &  shaderCode 
)
private
GLuint Face3D::ShaderLoader::createProgram ( )
void Face3D::ShaderLoader::deleteShader ( const GLuint  shaderID)
GLuint Face3D::ShaderLoader::getProgram ( const std::string &  shaderClassName)

get shader program

ShaderLoader & Face3D::ShaderLoader::Instance ( )
static

get instance

void Face3D::ShaderLoader::linkProgram ( const GLuint  programID)
GLuint Face3D::ShaderLoader::loadShader ( const std::string &  shaderClassName,
GLenum  shaderType 
)
GLuint Face3D::ShaderLoader::loadVertexAndFragmentShader ( const std::string &  shaderClassName)
private
std::string Face3D::ShaderLoader::readInShaderCode ( const std::string &  pathToShaderFile)
private

Member Data Documentation

std::map<std::string, GLuint> Face3D::ShaderLoader::m_ShaderProgramMap
private

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