Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ShaderParamPreamble.h File Reference
#include <PhosphorShaders/phosphorshaders_export.h>
#include <QList>
#include <QString>

Go to the source code of this file.

Classes

struct  PhosphorShaders::PreambleParam
 One declared shader parameter, in metadata declaration order, as fed to buildParamPreamble. More...
 

Namespaces

namespace  PhosphorShaders
 

Functions

PHOSPHORSHADERS_EXPORT QString PhosphorShaders::buildParamPreamble (const QList< PreambleParam > &params)
 Build the generated #define p_<id> <glsl-accessor> preamble for a shader's declared parameters.
 
PHOSPHORSHADERS_EXPORT bool PhosphorShaders::isValidParamId (const QString &id)
 True if id is a valid GLSL identifier body ([A-Za-z0-9_], non-empty) — the p_ prefix supplies the leading character, so a leading digit is fine.
 
PHOSPHORSHADERS_EXPORT QString PhosphorShaders::spliceAfterVersion (const QString &source, const QString &block)
 Splice block into source immediately after its #version line, then emit a #line <n> 0 directive so the author's subsequent lines keep their original numbers (source string 0) despite the inserted block.