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

◆ set_influence_target()

void MayaFlux::Nexus::Agent::set_influence_target ( std::shared_ptr< Buffers::RenderProcessor proc)

Set the render processor to target for GPU-side influence delivery.

Creates a UBO matching the InfluenceUBO layout, registers a binding named "u_influence" at set=1 binding=0 on the target processor, and binds the UBO. On each subsequent invoke(), the context fields are packed into the UBO automatically.

Parameters
procTarget render processor. Must outlive this Emitter or be cleared via clear_influence_target() first.

Definition at line 9 of file Agent.cpp.

10{
11 if (!proc) {
13 "Cannot set null influence target");
14 return;
15 }
16
17 if (m_influence_ubo) {
19 }
20
21 m_influence_ubo = std::make_shared<Buffers::VKBuffer>(
22 sizeof(InfluenceUBO),
25
26 proc->add_binding("u_influence",
27 Buffers::ShaderBinding { 1, 0, vk::DescriptorType::eUniformBuffer });
28
29 proc->bind_buffer("u_influence", m_influence_ubo);
30
31 m_influence_target = std::move(proc);
32}
#define MF_ERROR(comp, ctx,...)
@ UNIFORM
Uniform buffer (host-visible)
void clear_influence_target()
Disconnect from the current influence target.
Definition Agent.cpp:34
std::shared_ptr< Buffers::RenderProcessor > m_influence_target
Definition Agent.hpp:297
std::shared_ptr< Buffers::VKBuffer > m_influence_ubo
Definition Agent.hpp:298
@ Init
Engine/subsystem initialization.
@ Nexus
Spatial indexing and scheduling for user-defined behaviour.
@ UNKNOWN
Unknown or undefined modality.

References clear_influence_target(), MayaFlux::Journal::Init, m_influence_target, m_influence_ubo, MF_ERROR, MayaFlux::Journal::Nexus, MayaFlux::Buffers::VKBuffer::UNIFORM, and MayaFlux::Kakshya::UNKNOWN.

+ Here is the call graph for this function: