Inviwo  0.9.10.1
Inviwo documentation
inviwo::Shader Class Reference

Public Types

enum  OnError { Warn, Throw }
 
enum  Build { Yes, No }
 
enum  UniformWarning { Ignore, Warn, Throw }
 
using iterator = util::TransformIterator< transform_t, typename ShaderMap::iterator >
 
using const_iterator = util::TransformIterator< const_transform_t, typename ShaderMap::const_iterator >
 

Public Member Functions

 Shader (const std::vector< std::pair< ShaderType, std::string >> &items, Build buildShader=Build::Yes)
 
 Shader (const std::vector< std::pair< ShaderType, std::shared_ptr< const ShaderResource >>> &items, Build buildShader=Build::Yes)
 
 Shader (std::string fragmentFilename, bool buildShader=true)
 
 Shader (std::string vertexFilename, std::string fragmentFilename, bool buildShader=true)
 
 Shader (std::string vertexFilename, std::string geometryFilename, std::string fragmentFilename, bool buildShader=true)
 
 Shader (const char *fragmentFilename, bool buildShader=true)
 
 Shader (const char *vertexFilename, const char *fragmentFilename, bool buildShader=true)
 
 Shader (const char *vertexFilename, const char *geometryFilename, const char *fragmentFilename, bool buildShader=true)
 
 Shader (std::vector< std::unique_ptr< ShaderObject >> &shaderObjects, bool buildShader=true)
 
 Shader (const Shader &rhs)
 
 Shader (Shader &&rhs)
 
Shaderoperator= (const Shader &that)
 
Shaderoperator= (Shader &&that)
 
void link ()
 
void build ()
 
bool isReady () const
 
GLuint getID () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
util::iter_range< iteratorgetShaderObjects ()
 
util::iter_range< const_iteratorgetShaderObjects () const
 
ShaderObjectoperator[] (ShaderType type) const
 
ShaderObjectgetShaderObject (ShaderType type) const
 
ShaderObjectgetVertexShaderObject () const
 
ShaderObjectgetGeometryShaderObject () const
 
ShaderObjectgetFragmentShaderObject () const
 
void activate ()
 
void deactivate ()
 
template<typename T >
void setUniform (const std::string &name, const T &value) const
 
template<typename T >
void setUniform (const std::string &name, std::size_t len, const T *value) const
 
void setUniformWarningLevel (UniformWarning level)
 
const BaseCallBack * onReload (std::function< void()> callback)
 
void removeOnReload (const BaseCallBack *callback)
 

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