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

◆ on_attach()

void MayaFlux::Buffers::GraphicsBatchProcessor::on_attach ( 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 76 of file RootGraphicsBuffer.cpp.

77{
78 auto root_graphics_buffer = std::dynamic_pointer_cast<RootGraphicsBuffer>(buffer);
79 if (!root_graphics_buffer) {
80 error<std::invalid_argument>(
83 std::source_location::current(),
84 "GraphicsBatchProcessor can only be attached to RootGraphicsBuffer");
85 }
86
88 error<std::runtime_error>(
91 std::source_location::current(),
92 "GraphicsBatchProcessor token incompatible with RootGraphicsBuffer requirements");
93 }
94}
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: