MayaFlux 1.0.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 503 of file ShaderSpec.hpp.

508 {
509 m_functions.push_back({ .return_type = std::move(return_type),
510 .name = std::move(name),
511 .params = std::move(params),
512 .body = std::move(body) });
513 return *this;
514 }
std::string name
Definition VKDevice.cpp:123

References m_functions, and name.

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

+ Here is the caller graph for this function: