MayaFlux 1.0.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 77 of file RelaxationEmitProcessor.cpp.

78{
79 if (!m_grid) {
80 return;
81 }
82
83 m_params.width = m_grid->get_grid_width();
84 m_params.height = m_grid->get_grid_height();
85
86 auto& data = get_push_constant_data();
87 if (data.size() < sizeof(EmitParams)) {
88 set_push_constant_size(sizeof(EmitParams));
89 }
90 std::memcpy(data.data(), &m_params, sizeof(EmitParams));
91}
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: