Face3d
|
#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 ShaderLoader & | Instance () |
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 |
singleton class to load shaders and compile them
|
inlineprivate |
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 | ) |
|
private |
|
private |
GLuint Face3D::ShaderLoader::createProgram | ( | ) |
void Face3D::ShaderLoader::deleteShader | ( | const GLuint | shaderID | ) |
GLuint Face3D::ShaderLoader::getProgram | ( | const std::string & | shaderClassName | ) |
get shader program
|
static |
get instance
void Face3D::ShaderLoader::linkProgram | ( | const GLuint | programID | ) |
GLuint Face3D::ShaderLoader::loadShader | ( | const std::string & | shaderClassName, |
GLenum | shaderType | ||
) |
|
private |
|
private |
|
private |