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

◆ processing_function()

void MayaFlux::Buffers::PresentProcessor::processing_function ( std::shared_ptr< Buffer buffer)
overridevirtual

Executes the render callback.

Parameters
bufferBuffer to process (must be RootGraphicsBuffer)

Validates buffer type and invokes the render callback. This is the core rendering coordination point - all child buffers have been processed by the time this executes.

Implements MayaFlux::Buffers::BufferProcessor.

Definition at line 115 of file RootGraphicsBuffer.cpp.

116{
117 auto root_graphics_buffer = std::dynamic_pointer_cast<RootGraphicsBuffer>(buffer);
118 if (!root_graphics_buffer) {
120 "RenderProcessor received non-RootGraphicsBuffer");
121 return;
122 }
123
124 if (m_root_buffer && root_graphics_buffer != m_root_buffer) {
126 "RenderProcessor processing buffer that doesn't match attached root");
127 return;
128 }
129
130 if (m_callback) {
131 try {
132 m_callback(root_graphics_buffer);
133 } catch (const std::exception& e) {
137 std::source_location::current(),
138 "RenderProcessor callback threw exception: {}",
139 e.what());
140 }
141 } else {
142 fallback_renderer(root_graphics_buffer);
143 }
144}
#define MF_RT_ERROR(comp, ctx,...)
RenderCallback m_callback
User-provided render callback.
void fallback_renderer(const std::shared_ptr< RootGraphicsBuffer > &root)
std::shared_ptr< RootGraphicsBuffer > m_root_buffer
Reference to root buffer (for validation and callbacks)
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
void error_rethrow(Component component, Context context, std::source_location location=std::source_location::current(), std::string_view additional_context="")
Catch and log an exception, then rethrow it.
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, fallback_renderer(), m_callback, m_root_buffer, and MF_RT_ERROR.

+ Here is the call graph for this function: