OpenWalnut
1.5.0dev
|
This class is able to provide arbitrary values as define statements in GLSL code. More...
#include <WGEShaderPropertyDefine.h>
Public Types | |
typedef std::shared_ptr< WGEShaderPropertyDefine< PropertyType > > | SPtr |
Shared pointer for this class. More... | |
typedef std::shared_ptr< const WGEShaderPropertyDefine< PropertyType > > | ConstSPtr |
A const shared pointer for this class. More... | |
Public Types inherited from WGEShaderDefine< PropertyType::element_type::ValueType > | |
typedef std::shared_ptr< WGEShaderDefine< PropertyType::element_type::ValueType > > | SPtr |
Shared pointer for this class. More... | |
typedef std::shared_ptr< const WGEShaderDefine< PropertyType::element_type::ValueType > > | ConstSPtr |
A const shared pointer for this class. More... | |
Public Types inherited from WGEShaderPreprocessor | |
typedef std::shared_ptr< WGEShaderPreprocessor > | SPtr |
Shared pointer for this class. More... | |
typedef std::shared_ptr< const WGEShaderPreprocessor > | ConstSPtr |
A const shared pointer for this class. More... | |
Public Member Functions | |
WGEShaderPropertyDefine (std::string name, PropertyType prop) | |
Constructs a define with a given name and initial value. More... | |
virtual | ~WGEShaderPropertyDefine () |
Destructor. More... | |
Public Member Functions inherited from WGEShaderDefine< PropertyType::element_type::ValueType > | |
WGEShaderDefine (std::string name, PropertyType::element_type::ValueType value=PropertyType::element_type::ValueType(0)) | |
Constructs a define with a given name and initial value. More... | |
virtual | ~WGEShaderDefine () |
Destructor. More... | |
virtual std::string | process (const std::string &file, const std::string &code) const |
Process the whole code. More... | |
std::string | getName () const |
Returns the name of the define. More... | |
const PropertyType::element_type::ValueType & | getValue () const |
Returns the current value. More... | |
void | setValue (const PropertyType::element_type::ValueType &value) |
Sets the new value for this define. More... | |
Public Member Functions inherited from WGEShaderPreprocessor | |
WGEShaderPreprocessor () | |
Default constructor. More... | |
virtual | ~WGEShaderPreprocessor () |
Destructor. More... | |
virtual WCondition::SPtr | getChangeCondition () const |
Returns the condition denoting a change in this preprocessor filter. More... | |
void | setActive (bool active=true) |
(De-)activates the preprocessor. More... | |
bool | getActive () const |
If the preprocessor is active, this returns true. More... | |
Private Member Functions | |
void | setNewValue () |
Sets the value depending on the current value of the property. More... | |
Private Attributes | |
PropertyType | m_property |
The associated property. More... | |
boost::signals2::connection | m_connection |
The connection between the prop and the define. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from WGEShaderPreprocessor | |
virtual void | updated () |
Fires m_updateCondition which should denote an update in the preprocessor filter. More... | |
This class is able to provide arbitrary values as define statements in GLSL code.
Unlike WGEShaderDefine, it is automatically controlled by a WPropertyVariable. You might hope that WPropBool define and undefine this thing. Thats not the case. A WPropBool causes this to be 0 or 1. If you need the first behavior, use WGEShaderDefineOptions or WGEShaderPropertyDefineOptions.
Definition at line 46 of file WGEShaderPropertyDefine.h.
typedef std::shared_ptr< const WGEShaderPropertyDefine< PropertyType > > WGEShaderPropertyDefine< PropertyType >::ConstSPtr |
A const shared pointer for this class.
Definition at line 57 of file WGEShaderPropertyDefine.h.
typedef std::shared_ptr< WGEShaderPropertyDefine< PropertyType > > WGEShaderPropertyDefine< PropertyType >::SPtr |
Shared pointer for this class.
Definition at line 52 of file WGEShaderPropertyDefine.h.
WGEShaderPropertyDefine< PropertyType >::WGEShaderPropertyDefine | ( | std::string | name, |
PropertyType | prop | ||
) |
Constructs a define with a given name and initial value.
name | name of the define |
prop | the property controlling this define |
Definition at line 91 of file WGEShaderPropertyDefine.h.
References WGEShaderPropertyDefine< PropertyType >::m_connection.
|
virtual |
Destructor.
Definition at line 100 of file WGEShaderPropertyDefine.h.
|
private |
Sets the value depending on the current value of the property.
Definition at line 107 of file WGEShaderPropertyDefine.h.
References WGEShaderDefine< ValueType >::setValue().
|
private |
The connection between the prop and the define.
Definition at line 87 of file WGEShaderPropertyDefine.h.
Referenced by WGEShaderPropertyDefine< PropertyType >::WGEShaderPropertyDefine().
|
private |
The associated property.
Definition at line 77 of file WGEShaderPropertyDefine.h.