MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ function()

Assemble & MayaFlux::Portal::Graphics::ShaderSpec::Assemble::function ( std::string  return_type,
std::string  name,
std::string  params,
std::string  body 
)
inline

Declare a function emitted before main() in the generated GLSL.

Parameters
return_typeGLSL return type spelling.
nameFunction name, callable from the kernel body.
paramsParameter list verbatim, including types ("vec3 p").
bodyFunction body text without the enclosing braces.

Requires a kernel supplied via MF_KERNEL. Names are emitted as given; two functions sharing a name produce a GLSL redefinition error rather than a silent override.

Definition at line 490 of file ShaderSpec.hpp.

495 {
496 m_functions.push_back({ .return_type = std::move(return_type),
497 .name = std::move(name),
498 .params = std::move(params),
499 .body = std::move(body) });
500 return *this;
501 }
std::string name
Definition VKDevice.cpp:143

References m_functions, and name.

Referenced by MayaFlux::Nodes::Network::GpuFieldOperator::build_spec().

+ Here is the caller graph for this function: