25 #ifndef WGESHADERPROPERTYDEFINE_H
26 #define WGESHADERPROPERTYDEFINE_H
32 #include <boost/signals2.hpp>
34 #include "../../common/WPropertyTypes.h"
35 #include "../../common/WPropertyVariable.h"
36 #include "WGEShaderDefine.h"
45 template<
typename PropertyType = WPropBool >
52 typedef std::shared_ptr< WGEShaderPropertyDefine< PropertyType > >
SPtr;
57 typedef std::shared_ptr< const WGEShaderPropertyDefine< PropertyType > >
ConstSPtr;
90 template<
typename PropertyType >
92 WGEShaderDefine< typename PropertyType::element_type::ValueType >( name, prop->get() ),
99 template<
typename PropertyType >
103 m_connection.disconnect();
106 template<
typename PropertyType >
This class is able to provide arbitrary values as define statements in GLSL code.
void setValue(const ValueType &value)
Sets the new value for this define.
This class is able to provide arbitrary values as define statements in GLSL code.
std::shared_ptr< WGEShaderPropertyDefine< PropertyType > > SPtr
Shared pointer for this class.
virtual ~WGEShaderPropertyDefine()
Destructor.
boost::signals2::connection m_connection
The connection between the prop and the define.
std::shared_ptr< const WGEShaderPropertyDefine< PropertyType > > ConstSPtr
A const shared pointer for this class.
WGEShaderPropertyDefine(std::string name, PropertyType prop)
Constructs a define with a given name and initial value.
PropertyType m_property
The associated property.
void setNewValue()
Sets the value depending on the current value of the property.