25 #ifndef WGESHADERDEFINEOPTIONS_H
26 #define WGESHADERDEFINEOPTIONS_H
33 #include "WGEShaderPreprocessor.h"
49 typedef std::shared_ptr< WGEShaderDefineOptions >
SPtr;
54 typedef std::shared_ptr< const WGEShaderDefineOptions >
ConstSPtr;
76 std::string option2 =
"", std::string option3 =
"", std::string option4 =
"", std::string option5 =
"",
77 std::string option6 =
"", std::string option7 =
"", std::string option8 =
"", std::string option9 =
"",
78 std::string option10 =
"" );
100 virtual std::string
process(
const std::string& file,
const std::string& code )
const;
This GLSL preprocessor is able to set one define from a list of defines depending on the active optio...
void activateAllOptions()
Activates all the options.
virtual ~WGEShaderDefineOptions()
Destructor.
void deactivateOption(size_t idx)
De-activates the specified option.
WGEShaderDefineOptions(std::string first, std::string option2="", std::string option3="", std::string option4="", std::string option5="", std::string option6="", std::string option7="", std::string option8="", std::string option9="", std::string option10="")
Create a new instance of this class.
std::vector< std::string > m_options
The list of options.
IdxList m_idx
The currently selected options.
const IdxList & getActiveOptions() const
Returns the currently active option as index.
void deactivateAllOptions()
De-activates all the options.
std::vector< size_t > IdxList
The type of the index list.
std::shared_ptr< WGEShaderDefineOptions > SPtr
Shared pointer for this class.
std::string getOptionName(size_t idx) const
Returns the name of the specified option.
void setActivationList(const IdxList &newList)
Sets the specified index list as the new activation list.
virtual std::string process(const std::string &file, const std::string &code) const
Process the whole code.
std::shared_ptr< const WGEShaderDefineOptions > ConstSPtr
A const shared pointer for this class.
void addOption(std::string opt)
Adds the specified string as option which is inserted to the code as "#define NAME" if active.
void activateOption(size_t idx, bool exclusive=true)
Activates the option specified.
Base class for each preprocessing possible to shader code.