ComputerGraphik TU WIEN
Classes | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
Shader Class Reference

Encapsulates a shader program. More...

#include <shader.hpp>

Classes

class  ShaderObj
 Helper class to manage one Shader object file in RAII style. More...
 

Public Member Functions

 Shader (const std::vector< std::pair< GLenum, std::string > > &shaderPaths)
 
 ~Shader ()
 
void use () const
 
GLuint programHandle () const
 

Static Public Member Functions

static void loadTextFile (const std::string &filename, std::vector< char > &data)
 

Static Private Member Functions

static GLuint compileShader (const std::vector< char > &shaderSrc, GLenum shaderType)
 

Private Attributes

GLuint program_handle
 

Friends

class ShaderObj
 

Detailed Description

Encapsulates a shader program.

Constructor & Destructor Documentation

Shader::Shader ( const std::vector< std::pair< GLenum, std::string > > &  shaderPaths)
Shader::~Shader ( )

Member Function Documentation

GLuint Shader::compileShader ( const std::vector< char > &  shaderSrc,
GLenum  shaderType 
)
staticprivate
void Shader::loadTextFile ( const std::string &  filename,
std::vector< char > &  data 
)
static
GLuint Shader::programHandle ( ) const
inline
void Shader::use ( ) const
inline

Friends And Related Function Documentation

friend class ShaderObj
friend

Member Data Documentation

GLuint Shader::program_handle
private

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