GLW
Computer Graphics Structures library
glw::Program Class Reference

Holds several compiled shaders which are used as a whole. More...

Public Member Functions

 Program ()
 Creates shader program.
 
 ~Program ()
 Destroy program object and remove OpenGL references.
 
bool AttachShader (const PShader &shader_ptr)
 Attaches a compiled shader to the program.
 
bool Link ()
 Links all attached Shader files and returns whether linking finished successfully.
 
bool IsLinked () const
 Checks, whether last linking has finished successful.
 
gl::GLuint GetID () const
 Returns OpenGL reference index.
 
std::string GetLinkLog () const
 Returns log of last linking. When no errors nor warnings occurred, returned string is empty.
 
void Use () const
 Use this program as OpenGL current.
 
gl::GLint GetUniformLocation (const std::string &name) const
 Returns location of uniform variable with specified name.
 
gl::GLint GetUniformBlockLocation (const std::string &name) const
 Returns location of uniform block with specified name.
 

Static Public Member Functions

static PProgram Create ()
 Crates a program object and returns reference.
 

Detailed Description

Holds several compiled shaders which are used as a whole.