Executes the render callback.
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.
159{
160 auto root_graphics_buffer = std::dynamic_pointer_cast<RootGraphicsBuffer>(
buffer);
161 if (!root_graphics_buffer) {
163 "RenderProcessor received non-RootGraphicsBuffer");
164 return;
165 }
166
169 "RenderProcessor processing buffer that doesn't match attached root");
170 return;
171 }
172
174 try {
176 } catch (const std::exception& e) {
180 std::source_location::current(),
181 "RenderProcessor callback threw exception: {}",
182 e.what());
183 }
184 } else {
186 }
187}
#define MF_RT_ERROR(comp, ctx,...)
std::shared_ptr< NetworkGeometryBuffer > buffer
RenderCallback m_callback
User-provided render callback.
std::weak_ptr< RootGraphicsBuffer > m_root_buffer
Root buffer this presenter is attached to.
void fallback_renderer(const std::shared_ptr< RootGraphicsBuffer > &root)
bool m_attached
Distinguishes an expired attachment from an unattached presenter.
@ 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.