25 #ifndef WGESHADERDEFINE_H
26 #define WGESHADERDEFINE_H
32 #include <boost/shared_ptr.hpp>
35 #include "../../common/WStringUtils.h"
37 #include "WGEShaderPreprocessor.h"
42 template<
typename ValueType =
bool >
49 typedef boost::shared_ptr< WGEShaderDefine< ValueType > >
SPtr;
54 typedef boost::shared_ptr< const WGEShaderDefine< ValueType > >
ConstSPtr;
77 virtual std::string
process(
const std::string& file,
const std::string& code )
const;
113 template<
typename ValueType >
122 template<
typename ValueType >
128 template<
typename ValueType >
138 template<
typename ValueType >
144 template<
typename ValueType >
150 template<
typename ValueType >
163 #endif // WGESHADERDEFINE_H
const ValueType & getValue() const
Returns the current value.
ValueType m_value
The value of the define as a string.
virtual ~WGEShaderDefine()
Destructor.
std::string m_name
The name of the define.
void setValue(const ValueType &value)
Sets the new value for this define.
std::string toString(const T &value)
Convert a given value to a string.
WGEShaderDefine(std::string name, ValueType value=ValueType(0))
Constructs a define with a given name and initial value.
std::string getName() const
Returns the name of the define.
Base class for each preprocessing possible to shader code.
boost::shared_ptr< const WGEShaderDefine< ValueType > > ConstSPtr
A const shared pointer for this class.
This class is able to provide arbitrary values as define statements in GLSL code. ...
boost::shared_ptr< WGEShaderDefine< ValueType > > SPtr
Shared pointer for this class.
virtual std::string process(const std::string &file, const std::string &code) const
Process the whole code.