UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::graphic::Shader Class Reference

#include <ugdk/graphic/shader.h>

Collaboration diagram for ugdk::graphic::Shader:

Public Member Functions

 Shader (GLuint shaderType)
 
 ~Shader ()
 
GLuint id () const
 
void AddLineInMain (const std::string &line)
 
void AddCodeBlock (const std::string &block)
 
void GenerateSource ()
 
bool Compile () const
 
void set_source (const std::string &source)
 Sets the source code for this shader. More...
 

Protected Attributes

GLuint id_
 
GLuint type_
 
std::string source_
 
std::string blocks_
 
std::string main_
 

Constructor & Destructor Documentation

ugdk::graphic::Shader::Shader ( GLuint  shaderType)
ugdk::graphic::Shader::~Shader ( )

Member Function Documentation

void ugdk::graphic::Shader::AddCodeBlock ( const std::string &  block)
inline
void ugdk::graphic::Shader::AddLineInMain ( const std::string &  line)
inline
bool ugdk::graphic::Shader::Compile ( ) const
void ugdk::graphic::Shader::GenerateSource ( )
GLuint ugdk::graphic::Shader::id ( ) const
inline
void ugdk::graphic::Shader::set_source ( const std::string &  source)
inline

Sets the source code for this shader.

Warning: Overrides any generated source. You MUST use at least the variable names UGDK expects by default in SetupProgram. You know what you doing. For great justice!

Member Data Documentation

std::string ugdk::graphic::Shader::blocks_
protected
GLuint ugdk::graphic::Shader::id_
protected
std::string ugdk::graphic::Shader::main_
protected
std::string ugdk::graphic::Shader::source_
protected
GLuint ugdk::graphic::Shader::type_
protected

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