OpenWalnut
1.4.0
|
This class is able to provide arbitrary values as define statements in GLSL code. More...
#include <WGEShaderPropertyDefine.h>
Public Types | |
typedef boost::shared_ptr < WGEShaderPropertyDefine < PropertyType > > | SPtr |
Shared pointer for this class. | |
typedef boost::shared_ptr < const WGEShaderPropertyDefine < PropertyType > > | ConstSPtr |
A const shared pointer for this class. | |
Public Member Functions | |
WGEShaderPropertyDefine (std::string name, PropertyType prop) | |
Constructs a define with a given name and initial value. | |
virtual | ~WGEShaderPropertyDefine () |
Destructor. | |
Private Member Functions | |
void | setNewValue () |
Sets the value depending on the current value of the property. | |
Private Attributes | |
PropertyType | m_property |
The associated property. | |
boost::signals2::connection | m_connection |
The connection between the prop and the define. |
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 47 of file WGEShaderPropertyDefine.h.
typedef boost::shared_ptr< const WGEShaderPropertyDefine< PropertyType > > WGEShaderPropertyDefine< PropertyType >::ConstSPtr |
A const shared pointer for this class.
Reimplemented from WGEShaderDefine< PropertyType::element_type::ValueType >.
Definition at line 58 of file WGEShaderPropertyDefine.h.
typedef boost::shared_ptr< WGEShaderPropertyDefine< PropertyType > > WGEShaderPropertyDefine< PropertyType >::SPtr |
Shared pointer for this class.
Reimplemented from WGEShaderDefine< PropertyType::element_type::ValueType >.
Definition at line 53 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 92 of file WGEShaderPropertyDefine.h.
References WGEShaderPropertyDefine< PropertyType >::m_connection.
WGEShaderPropertyDefine< PropertyType >::~WGEShaderPropertyDefine | ( | ) | [virtual] |
Destructor.
Definition at line 101 of file WGEShaderPropertyDefine.h.
void WGEShaderPropertyDefine< PropertyType >::setNewValue | ( | ) | [private] |
Sets the value depending on the current value of the property.
Definition at line 108 of file WGEShaderPropertyDefine.h.
References WGEShaderDefine< ValueType >::setValue().
boost::signals2::connection WGEShaderPropertyDefine< PropertyType >::m_connection [private] |
The connection between the prop and the define.
Definition at line 88 of file WGEShaderPropertyDefine.h.
Referenced by WGEShaderPropertyDefine< PropertyType >::WGEShaderPropertyDefine().
PropertyType WGEShaderPropertyDefine< PropertyType >::m_property [private] |
The associated property.
Definition at line 78 of file WGEShaderPropertyDefine.h.