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

◆ on_attach()

void MayaFlux::Buffers::GraphicsBatchProcessor::on_attach ( const std::shared_ptr< Buffer > &  buffer)
overridevirtual

Called when processor is attached to a buffer.

Parameters
bufferBuffer being attached to

Validates that the buffer is a RootGraphicsBuffer and ensures token compatibility for GPU processing.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 79 of file RootGraphicsBuffer.cpp.

80{
81 auto root_graphics_buffer = std::dynamic_pointer_cast<RootGraphicsBuffer>(buffer);
82 if (!root_graphics_buffer) {
83 error<std::invalid_argument>(
86 std::source_location::current(),
87 "GraphicsBatchProcessor can only be attached to RootGraphicsBuffer");
88 }
89
91 error<std::runtime_error>(
94 std::source_location::current(),
95 "GraphicsBatchProcessor token incompatible with RootGraphicsBuffer requirements");
96 }
97}
bool are_tokens_compatible(ProcessingToken preferred, ProcessingToken current)
Determines if two processing tokens are compatible for joint execution.
@ GRAPHICS_BACKEND
Standard graphics processing backend configuration.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Buffers::are_tokens_compatible(), MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Core, MayaFlux::Buffers::GRAPHICS_BACKEND, and MayaFlux::Buffers::BufferProcessor::m_processing_token.

+ Here is the call graph for this function: