25 #ifndef WGESHADERCODEINJECTOR_H
26 #define WGESHADERCODEINJECTOR_H
31 #include "WGEShaderPreprocessor.h"
44 typedef std::shared_ptr< WGEShaderCodeInjector >
SPtr;
49 typedef std::shared_ptr< WGEShaderCodeInjector >
ConstSPtr;
71 virtual std::string
process(
const std::string& file,
const std::string& code )
const;
78 void setCode( std::string code );
This preprocessor is able to inject code into a shader.
std::string m_code
the custom code.
std::shared_ptr< WGEShaderCodeInjector > ConstSPtr
Shortcut for a const shared_ptr.
virtual ~WGEShaderCodeInjector()
Destructor.
std::shared_ptr< WGEShaderCodeInjector > SPtr
Shortcut for a shared_ptr.
virtual std::string process(const std::string &file, const std::string &code) const
Process the whole code.
void setCode(std::string code)
Define the code that replaces the keyword.
std::string m_keyword
What to replace.
WGEShaderCodeInjector(std::string keyword)
Default constructor.
Base class for each preprocessing possible to shader code.