OpenWalnut
1.5.0dev
|
This preprocessor removes the version-statement from the code and puts it to the beginning of the code. More...
#include <WGEShaderVersionPreprocessor.h>
Public Member Functions | |
WGEShaderVersionPreprocessor () | |
Default constructor. More... | |
virtual | ~WGEShaderVersionPreprocessor () |
Destructor. More... | |
virtual std::string | process (const std::string &file, const std::string &code) const |
Process the whole code. More... | |
Public Member Functions inherited from WGEShaderPreprocessor | |
WGEShaderPreprocessor () | |
Default constructor. More... | |
virtual | ~WGEShaderPreprocessor () |
Destructor. More... | |
virtual WCondition::SPtr | getChangeCondition () const |
Returns the condition denoting a change in this preprocessor filter. More... | |
void | setActive (bool active=true) |
(De-)activates the preprocessor. More... | |
bool | getActive () const |
If the preprocessor is active, this returns true. More... | |
Additional Inherited Members | |
Public Types inherited from WGEShaderPreprocessor | |
typedef std::shared_ptr< WGEShaderPreprocessor > | SPtr |
Shared pointer for this class. More... | |
typedef std::shared_ptr< const WGEShaderPreprocessor > | ConstSPtr |
A const shared pointer for this class. More... | |
Protected Member Functions inherited from WGEShaderPreprocessor | |
virtual void | updated () |
Fires m_updateCondition which should denote an update in the preprocessor filter. More... | |
This preprocessor removes the version-statement from the code and puts it to the beginning of the code.
This is requires for some GLSL compiler.
Definition at line 38 of file WGEShaderVersionPreprocessor.h.
WGEShaderVersionPreprocessor::WGEShaderVersionPreprocessor | ( | ) |
Default constructor.
Definition at line 37 of file WGEShaderVersionPreprocessor.cpp.
|
virtual |
Destructor.
Definition at line 42 of file WGEShaderVersionPreprocessor.cpp.
|
virtual |
Process the whole code.
It is not allowed to modify some internal state in this function because it might be called by several shaders.
code | the code to process |
file | the filename of the shader currently processed. Should be used for debugging output. |
Implements WGEShaderPreprocessor.
Definition at line 47 of file WGEShaderVersionPreprocessor.cpp.
References WGEShaderPreprocessor::getActive(), and wlog::warn().