GlobeEngine
ge::ShaderProgram Class Reference

#include <ShaderProgram.h>

Public Types

enum  ProgramType {
  NONE = 0, VERTEX, FRAGMENT, GEOMETRY,
  TESSCONTROL, TESSEVAL, COMPUTE
}
 
enum  ReloadType { EXISTING, FROMFILE, FROMSOURCE }
 

Public Member Functions

 ShaderProgram ()
 
 ~ShaderProgram ()
 
 ShaderProgram (const std::shared_ptr< ShaderProgram > copy)
 
void clear ()
 
void create (std::string _inputPath, ProgramType _type)
 
void createFromSource (std::string _source, ProgramType _type)
 
int addSourcePart (std::string _fileName)
 
void insertSourcePart (std::string _fileName, int _atIdx)
 
void removeSourcePart (int _idx)
 
void reload (ShaderProgram::ReloadType _reloadtype)
 
const std::vector< std::string > & getSourceParts () const
 
std::string getSource () const
 
void setProgramType (ProgramType _type)
 
bool compileShader ()
 
void parse (std::string _repoUrl)
 
GLuint getShaderObject ()
 
void printShaderInfoLog (GLuint obj, std::string _input)
 
bool getCompileResult (std::string _input)
 
bool isInAttribute (std::string _in) const
 
bool isOutAttribute (std::string _in) const
 
bool isDefineAttribute (std::string _in) const
 
void setDefineAttribute (std::string _in, int _value)
 
int getDefineValue (std::string _in) const
 
void setDefinesToZero ()
 
std::string getPathToFile () const
 
const std::shared_ptr< ge::ShaderAttributes > & getAttributes () const
 

Member Enumeration Documentation

Enumerator
NONE 
VERTEX 
FRAGMENT 
GEOMETRY 
TESSCONTROL 
TESSEVAL 
COMPUTE 
Enumerator
EXISTING 
FROMFILE 
FROMSOURCE 

Constructor & Destructor Documentation

ge::ShaderProgram::ShaderProgram ( )
ge::ShaderProgram::~ShaderProgram ( )
ge::ShaderProgram::ShaderProgram ( const std::shared_ptr< ShaderProgram copy)
inline

Member Function Documentation

int ge::ShaderProgram::addSourcePart ( std::string  _fileName)
void ge::ShaderProgram::clear ( )
bool ge::ShaderProgram::compileShader ( )
void ge::ShaderProgram::create ( std::string  _inputPath,
ProgramType  _type 
)
void ge::ShaderProgram::createFromSource ( std::string  _source,
ProgramType  _type 
)
const std::shared_ptr< ge::ShaderAttributes > & ge::ShaderProgram::getAttributes ( ) const
bool ge::ShaderProgram::getCompileResult ( std::string  _input)
int ge::ShaderProgram::getDefineValue ( std::string  _in) const
std::string ge::ShaderProgram::getPathToFile ( ) const
GLuint ge::ShaderProgram::getShaderObject ( )
std::string ge::ShaderProgram::getSource ( ) const
const std::vector< std::string > & ge::ShaderProgram::getSourceParts ( ) const
void ge::ShaderProgram::insertSourcePart ( std::string  _fileName,
int  _atIdx 
)
bool ge::ShaderProgram::isDefineAttribute ( std::string  _in) const
bool ge::ShaderProgram::isInAttribute ( std::string  _in) const
bool ge::ShaderProgram::isOutAttribute ( std::string  _in) const
void ge::ShaderProgram::parse ( std::string  _repoUrl)
void ge::ShaderProgram::printShaderInfoLog ( GLuint  obj,
std::string  _input 
)
void ge::ShaderProgram::reload ( ShaderProgram::ReloadType  _reloadtype)
void ge::ShaderProgram::removeSourcePart ( int  _idx)
void ge::ShaderProgram::setDefineAttribute ( std::string  _in,
int  _value 
)
void ge::ShaderProgram::setDefinesToZero ( )
void ge::ShaderProgram::setProgramType ( ProgramType  _type)

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