25 #ifndef WGESHADERPREPROCESSOR_H
26 #define WGESHADERPREPROCESSOR_H
32 #include "../../common/WCondition.h"
47 typedef std::shared_ptr< WGEShaderPreprocessor >
SPtr;
52 typedef std::shared_ptr< const WGEShaderPreprocessor >
ConstSPtr;
79 virtual std::string
process(
const std::string& file,
const std::string& code )
const = 0;
std::shared_ptr< WCondition > SPtr
Shared pointer type for WCondition.
Base class for each preprocessing possible to shader code.
void setActive(bool active=true)
(De-)activates the preprocessor.
virtual void updated()
Fires m_updateCondition which should denote an update in the preprocessor filter.
virtual ~WGEShaderPreprocessor()
Destructor.
virtual WCondition::SPtr getChangeCondition() const
Returns the condition denoting a change in this preprocessor filter.
bool getActive() const
If the preprocessor is active, this returns true.
virtual std::string process(const std::string &file, const std::string &code) const =0
Process the whole code.
WCondition::SPtr m_updateCondition
The condition fires on every call of updated().
bool m_active
If true the preprocessor is active.
std::shared_ptr< WGEShaderPreprocessor > SPtr
Shared pointer for this class.
std::shared_ptr< const WGEShaderPreprocessor > ConstSPtr
A const shared pointer for this class.
WGEShaderPreprocessor()
Default constructor.