ImFusion SDK 4.3
MultiAbstractIncludeBase Class Reference

#include <ImFusion/Core/GL/MultiAbstractInclude.h>

Non-templated base class of MultiIncludable to implement polymorphic interface. More...

+ Inheritance diagram for MultiAbstractIncludeBase:

Detailed Description

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.
 
- Public Member Functions inherited from AbstractInclude
 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::stringdefineName () const
 Returns the name of define used by this include.
 
const std::stringincludePath () 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

AbstractIncludem_baseInclude
 
std::string m_baseToken
 
std::string m_replacementToken
 
Flags< ShaderTextReplacementm_replacementScheme
 

Member Function Documentation

◆ includeCodeSubstitution()

std::function< std::string(const std::string &)> includeCodeSubstitution ( ) const
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.

◆ fingerprint()

Fingerprint fingerprint ( ) const
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.

◆ dependentIncludes()

std::vector< AbstractInclude * > dependentIncludes ( ) const
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.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close