![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Core/GL/MultiAbstractInclude.h>
Non-templated base class of MultiIncludable to implement polymorphic interface. More...
Non-templated base class of MultiIncludable to implement polymorphic interface.
Public Member Functions | |
std::function< std::string(const std::string &)> | includeCodeSubstitution () const override |
Optionally the abstract include can provide a function to change the shader code. | |
bool | isValid () const |
Fingerprint | fingerprint () const override |
Provides a finger print of the include. | |
std::vector< AbstractInclude * > | dependentIncludes () const override |
Returns a list of dependent abstract includes that need to be included as well. | |
![]() | |
AbstractInclude (const std::string &defineName, const std::string &includePath) | |
Creates a AbstractInclude for the given define and with the corresponding GLSL file at includePath. | |
const std::string & | defineName () const |
Returns the name of define used by this include. | |
const std::string & | includePath () const |
Returns the path to the included shader file. | |
Protected Member Functions | |
MultiAbstractIncludeBase (AbstractInclude *baseInclude, const std::string &baseToken, const std::string &replacementToken, Flags< ShaderTextReplacement > replacementScheme) | |
void | markInvalid () |
Protected Attributes | |
AbstractInclude * | m_baseInclude |
std::string | m_baseToken |
std::string | m_replacementToken |
Flags< ShaderTextReplacement > | m_replacementScheme |
|
overridevirtual |
Optionally the abstract include can provide a function to change the shader code.
This function will be called after the shader include has been loaded from includePath() and receives the include code as argument. The function can then modify the code and is supposed to return the modified GLSL code. This can be used to include two instances of the same include by for example prefixing every uniform and function. The default implementation returns NULL and therefore does not change the code.
Reimplemented from AbstractInclude.
|
overridevirtual |
Provides a finger print of the include.
If two finger prints are equal this means that the two includes provide the very same code substitution. It does NOT mean that the two includes are equal. In particular the result of setArguments can be different.
Reimplemented from AbstractInclude.
|
inlineoverridevirtual |
Returns a list of dependent abstract includes that need to be included as well.
The default implementation returns an empty vector, you may override this method to your needs. The returned vector must be empty or contain valid pointers.
Reimplemented from AbstractInclude.