![]() |
Radium Engine
1.7.0
|
#include <Engine/Data/ShaderProgram.hpp>
Collaboration diagram for Ra::Engine::Data::ShaderProgram: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 |
| template<typename T > | |
| void | setUniform (gl::GLint location, const T &value) 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 |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Core::Vector2d &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Core::Vector3d &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Core::Vector4d &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Core::Matrix2d &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Core::Matrix3d &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Core::Matrix4d &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const Scalar &value) const |
| template<> | |
| RA_ENGINE_API void | setUniform (const char *name, const std::vector< Scalar > &value) const |
Abstraction of OpenGL Shader Program
Definition at line 34 of file ShaderProgram.hpp.
| Ra::Engine::Data::ShaderProgram::ShaderProgram | ( | ) |
Definition at line 76 of file ShaderProgram.cpp.
|
explicit |
Definition at line 83 of file ShaderProgram.cpp.
| Ra::Engine::Data::ShaderProgram::~ShaderProgram | ( | ) |
Definition at line 87 of file ShaderProgram.cpp.
| 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::bind | ( | ) | const |
Definition at line 258 of file ShaderProgram.cpp.
| ShaderConfiguration Ra::Engine::Data::ShaderProgram::getBasicConfiguration | ( | ) | const |
Definition at line 289 of file ShaderProgram.cpp.
| globjects::Program * Ra::Engine::Data::ShaderProgram::getProgramObject | ( | ) | const |
Definition at line 373 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::link | ( | ) |
Definition at line 210 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::load | ( | const Data::ShaderConfiguration & | shaderConfig | ) |
Definition at line 188 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::reload | ( | ) |
Definition at line 271 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Core::Matrix2d & | value ) const |
Definition at line 314 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Core::Matrix3d & | value ) const |
Definition at line 319 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Core::Matrix4d & | value ) const |
Definition at line 324 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Core::Vector2d & | value ) const |
Definition at line 299 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Core::Vector3d & | value ) const |
Definition at line 304 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Core::Vector4d & | value ) const |
Definition at line 309 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const Scalar & | value ) const |
Definition at line 329 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| const std::vector< Scalar > & | value ) const |
Definition at line 355 of file ShaderProgram.cpp.
|
inline |
Uniform setters.
Definition at line 138 of file ShaderProgram.hpp.
| void Ra::Engine::Data::ShaderProgram::setUniform | ( | const char * | name, |
| Texture * | tex, | ||
| int | texUnit ) const |
Definition at line 359 of file ShaderProgram.cpp.
|
inline |
Definition at line 56 of file ShaderProgram.hpp.
| 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.
Here is the call graph for this function:| void Ra::Engine::Data::ShaderProgram::unbind | ( | ) | const |
Definition at line 267 of file ShaderProgram.cpp.
| void Ra::Engine::Data::ShaderProgram::validate | ( | ) | const |
Definition at line 262 of file ShaderProgram.cpp.