Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::glfShader Class Reference

A GLSL vertex shader or fragment shader, which must be linked in a shader program. More...

#include <OpenGLFramework/Base/glfShader.hh>

Public Member Functions

void Create (GLenum type)
 Creates the shader without the GLSL source code, use other Create() methods to upload source afterwards. More...
 
void Create (GLenum type, const std::string &sourceCode)
 Creates the shader from the given GLSL source code. More...
 
void CreateFromFile (GLenum type, const std::string &fileName)
 Creates the shader from GLSL source code loaded from a file. More...
 
std::string GetInfoLog () const
 Returns the info log containing information about the compilation of the shader. More...
 
GLuint GetShaderID () const
 Returns the OpenGL id of the shader. More...
 
GLenum GetType ()
 Returns the OpenGL id of the shader. More...
 
 glfShader ()
 
 ~glfShader ()
 

Detailed Description

A GLSL vertex shader or fragment shader, which must be linked in a shader program.

Author
jkollmann

Definition at line 39 of file glfShader.hh.

Constructor & Destructor Documentation

glfShader::glfShader ( )

Definition at line 32 of file glfShader.cpp.

glfShader::~glfShader ( )

Definition at line 37 of file glfShader.cpp.

Member Function Documentation

void glfShader::Create ( GLenum  type)

Creates the shader without the GLSL source code, use other Create() methods to upload source afterwards.

Parameters
typee.g. GL_VERTEX_SHADER or GL_FRAGMENT_SHADER.
sourceCodeThe GLSL source.

Definition at line 55 of file glfShader.cpp.

Referenced by BIAS::glfShaderProgram::AttachShaderFromSource(), BIAS::PMDWarp::ExecuteLinearHypothesesAssignment(), BIAS::DistortionRendering::Init(), BIAS::TemplateSpecializedBatch::InitShaders_(), BIAS::PlainPerPixelProcessing::SetFragmentShaderFromString(), BIAS::PMDWarp::SetupShadersDefault_(), and BIAS::PMDWarp::SetupShadersProjectiveTexturing_().

void glfShader::Create ( GLenum  type,
const std::string &  sourceCode 
)

Creates the shader from the given GLSL source code.

Parameters
typee.g. GL_VERTEX_SHADER or GL_FRAGMENT_SHADER.
sourceCodeThe GLSL source.

Definition at line 64 of file glfShader.cpp.

void glfShader::CreateFromFile ( GLenum  type,
const std::string &  fileName 
)

Creates the shader from GLSL source code loaded from a file.

Parameters
typeEither GL_VERTEX_SHADER or GL_FRAGMENT_SHADER.
fileNameName of file to load the GLSL source from.

Definition at line 94 of file glfShader.cpp.

Referenced by BIAS::glfShaderProgram::AttachShaderFromFile(), and BIAS::PlainPerPixelProcessing::SetFragmentShaderFromFile().

string glfShader::GetInfoLog ( ) const

Returns the info log containing information about the compilation of the shader.

Note
If compiling the shader fails, the info log is also contained in the message of the thrown exception.

Definition at line 111 of file glfShader.cpp.

Referenced by BIAS::PMDWarp::ExecuteLinearHypothesesAssignment().

GLuint glfShader::GetShaderID ( ) const

Returns the OpenGL id of the shader.

Definition at line 127 of file glfShader.cpp.

Referenced by BIAS::glfShaderProgram::AttachShader().

GLenum BIAS::glfShader::GetType ( )
inline

Returns the OpenGL id of the shader.

Definition at line 83 of file glfShader.hh.


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