Radium Engine
1.5.0
|
#include <Engine/Data/ShaderProgram.hpp>
Public Member Functions | |
ShaderProgram (const Data::ShaderConfiguration &shaderConfig) | |
void | load (const Data::ShaderConfiguration &shaderConfig) |
void | reload () |
Data::ShaderConfiguration | getBasicConfiguration () const |
void | bind () const |
void | validate () const |
void | unbind () const |
template<typename T > | |
void | setUniform (const char *name, const T &value) const |
Uniform setters. | |
void | setUniform (const char *name, Texture *tex, int texUnit) const |
void | setUniformTexture (const char *name, Texture *tex) const |
globjects::Program * | getProgramObject () const |
void | addShaderFromSource (Data::ShaderType type, std::unique_ptr< globjects::StaticStringSource > &&source, const std::string &name="", bool fromFile=true) |
void | link () |
template<> | |
void | setUniform (const char *name, const Core::Vector2d &value) const |
template<> | |
void | setUniform (const char *name, const Core::Vector3d &value) const |
template<> | |
void | setUniform (const char *name, const Core::Vector4d &value) const |
template<> | |
void | setUniform (const char *name, const Core::Matrix2d &value) const |
template<> | |
void | setUniform (const char *name, const Core::Matrix3d &value) const |
template<> | |
void | setUniform (const char *name, const Core::Matrix4d &value) const |
template<> | |
void | setUniform (const char *name, const Scalar &value) const |
template<> | |
void | setUniform (const char *name, const std::vector< Scalar > &value) const |
Abstraction of OpenGL Shader Program
Definition at line 34 of file ShaderProgram.hpp.
void Ra::Engine::Data::ShaderProgram::addShaderFromSource | ( | Data::ShaderType | type, |
std::unique_ptr< globjects::StaticStringSource > && | source, | ||
const std::string & | name = "" , |
||
bool | fromFile = true |
||
) |
Definition at line 168 of file ShaderProgram.cpp.
void Ra::Engine::Data::ShaderProgram::link | ( | ) |
Definition at line 210 of file ShaderProgram.cpp.
void Ra::Engine::Data::ShaderProgram::setUniformTexture | ( | const char * | name, |
Texture * | tex | ||
) | const |
use automatic texture unit computation if you want to send a particular texture unit, use setUniform. It binds tex on an "arbitrary" tex unit.
Definition at line 365 of file ShaderProgram.cpp.