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

◆ write_emit_constants()

void MayaFlux::Buffers::RelaxationEmitProcessor::write_emit_constants ( )
private

Size the push constant block to EmitParams and upload the current parameters.

Called from on_attach and from the setters.

Definition at line 82 of file RelaxationEmitProcessor.cpp.

83{
84 if (!m_grid) {
85 return;
86 }
87
88 m_params.width = m_grid->get_grid_width();
89 m_params.height = m_grid->get_grid_height();
90
91 auto& data = get_push_constant_data();
92 if (data.size() < sizeof(EmitParams)) {
93 set_push_constant_size(sizeof(EmitParams));
94 }
95 std::memcpy(data.data(), &m_params, sizeof(EmitParams));
96}
std::shared_ptr< RelaxationGridBuffer > m_grid
const std::vector< uint8_t > & get_push_constant_data() const
Get current push constant data.
void set_push_constant_size()
Set push constant size from type.

References MayaFlux::Buffers::ShaderProcessor::get_push_constant_data(), MayaFlux::Buffers::RelaxationEmitProcessor::EmitParams::height, m_grid, m_params, MayaFlux::Buffers::ShaderProcessor::set_push_constant_size(), and MayaFlux::Buffers::RelaxationEmitProcessor::EmitParams::width.

Referenced by on_attach(), set_extent(), and set_point_size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: