6#include <PhosphorShaders/phosphorshaders_export.h>
56PHOSPHORSHADERS_EXPORT
bool definesMain(
const QString& expandedSource);
64PHOSPHORSHADERS_EXPORT
bool definesFunction(
const QString& expandedSource,
const QString& functionName);
85 const QList<EntryCandidate>& candidates);
98 const QList<EntryCandidate>& candidates);
Definition ShaderEffect.h:30
PHOSPHORSHADERS_EXPORT QString stripGlslComments(const QString &source)
Strip GLSL line (//…) and block (/* … *‍/) comments from source, preserving newlines inside block co...
PHOSPHORSHADERS_EXPORT bool definesFunction(const QString &expandedSource, const QString &functionName)
True if expandedSource defines a function named functionName.
PHOSPHORSHADERS_EXPORT QString composeEntryPoint(const QString &expandedSource, const QList< EntryCandidate > &candidates)
Compose the fragment entry point (T1.4).
PHOSPHORSHADERS_EXPORT bool definesMain(const QString &expandedSource)
True if expandedSource defines void main() at top level.
PHOSPHORSHADERS_EXPORT QString assembleEntryPoint(const QString &raw, const QString &prologue, const QList< EntryCandidate > &candidates)
Convenience wrapper for the full assembly: when candidates is empty or raw already defines main(),...
One candidate entry function the author may define, paired with the void main() the harness generates...
Definition ShaderEntryPoint.h:25
QString generatedMain
The complete void main() { ... } the harness appends when functionName is defined.
Definition ShaderEntryPoint.h:35
QString functionName
Name of the entry function the author defines, e.g. "pZone".
Definition ShaderEntryPoint.h:27
QStringList alsoRequires
Additional function names that must ALSO be defined for this candidate to match — for direction-dispa...
Definition ShaderEntryPoint.h:44
bool operator==(const EntryCandidate &) const =default