25 #ifndef WGESHADERDEFINE_H
26 #define WGESHADERDEFINE_H
31 #include <boost/shared_ptr.hpp>
33 #include "../../common/WStringUtils.h"
35 #include "WGEShaderPreprocessor.h"
40 template<
typename ValueType =
bool >
47 typedef boost::shared_ptr< WGEShaderDefine< ValueType > >
SPtr;
52 typedef boost::shared_ptr< const WGEShaderDefine< ValueType > >
ConstSPtr;
75 virtual std::string
process(
const std::string& file,
const std::string& code )
const;
111 template<
typename ValueType >
120 template<
typename ValueType >
126 template<
typename ValueType >
136 template<
typename ValueType >
142 template<
typename ValueType >
148 template<
typename ValueType >
161 #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.