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

◆ processing_function()

void MayaFlux::Buffers::VolumeFieldProcessor::processing_function ( const std::shared_ptr< Buffer > &  buffer)
overrideprotectedvirtual

Rewrite field descriptors, run the shader, then swap.

Parameters
bufferBuffer under processing.

Read slots change whenever an upstream stage swaps, so the bindings are rewritten every cycle rather than once.

Reimplemented from MayaFlux::Buffers::ShaderProcessor.

Definition at line 229 of file VolumeFieldProcessor.cpp.

230{
233 }
234
236
237 if (!m_volume || !wants_swap()) {
238 return;
239 }
240
241 for (const auto& field : m_swap_fields) {
242 m_volume->swap_field(field);
243 }
244}
virtual void processing_function(const std::shared_ptr< Buffer > &buffer)=0
The core processing function that must be implemented by derived classes.
bool are_descriptors_ready() const
Check if descriptors are initialized.
std::shared_ptr< VolumeGridBuffer > m_volume
The attached volume, null until on_attach validates it.
void write_field_descriptors()
Issue descriptor writes for every entry in the binding table.
virtual bool wants_swap() const
Whether this cycle's dispatch should be followed by a swap.

References MayaFlux::Buffers::ShaderProcessor::are_descriptors_ready(), m_swap_fields, m_volume, MayaFlux::Buffers::BufferProcessor::processing_function(), wants_swap(), and write_field_descriptors().

Referenced by MayaFlux::Buffers::InfluxProcessor::processing_function().

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