10class BufferProcessingChain;
82 void process_default()
override;
90 return m_child_buffers;
103 void set_final_processor(std::shared_ptr<BufferProcessor> processor);
109 std::shared_ptr<BufferProcessor> get_final_processor()
const;
119 std::vector<std::shared_ptr<VKBuffer>> get_buffers_by_usage(
VKBuffer::Usage usage)
const;
130 void cleanup_marked_buffers();
143 bool has_buffer(
const std::shared_ptr<VKBuffer>& buffer)
const;
166 return m_renderable_buffers;
176 m_renderable_buffers.clear();
186 std::shared_ptr<BufferProcessor> create_default_processor();
195 m_renderable_buffers.push_back(info);
213 bool m_token_active {};
251 void processing_function(
const std::shared_ptr<Buffer>& buffer)
override;
260 void on_attach(
const std::shared_ptr<Buffer>& buffer)
override;
267 [[nodiscard]]
bool is_compatible_with(
const std::shared_ptr<Buffer>& buffer)
const override;
330 using RenderCallback = std::function<void(
const std::shared_ptr<RootGraphicsBuffer>& root)>;
359 void processing_function(
const std::shared_ptr<Buffer>& buffer)
override;
368 void on_attach(
const std::shared_ptr<Buffer>& buffer)
override;
374 void on_detach(
const std::shared_ptr<Buffer>& buffer)
override;
381 [[nodiscard]]
bool is_compatible_with(
const std::shared_ptr<Buffer>& buffer)
const override;
396 [[nodiscard]]
bool has_callback()
const {
return static_cast<bool>(m_callback); }
419 void fallback_renderer(
const std::shared_ptr<RootGraphicsBuffer>& root);
Central computational transformation interface for continuous buffer processing.
std::shared_ptr< RootGraphicsBuffer > m_root_buffer
Shared pointer to the root buffer this processor manages.
Default processor for coordinating batch GPU buffer processing.
std::function< void(const std::shared_ptr< RootGraphicsBuffer > &root)> RenderCallback
Callback signature for render operations.
RenderCallback m_callback
User-provided render callback.
bool has_callback() const
Checks if a callback is configured.
~PresentProcessor() override=default
void clear_callback()
Clears the current callback.
std::shared_ptr< RootGraphicsBuffer > m_root_buffer
Reference to root buffer (for validation and callbacks)
Final processor that executes render operations after all buffer processing.
std::vector< RenderableBufferInfo > m_renderable_buffers
size_t get_buffer_count() const
Gets the number of child buffers.
const std::vector< RenderableBufferInfo > & get_renderable_buffers() const
Get list of buffers ready for rendering.
const std::vector< std::shared_ptr< VKBuffer > > & get_child_buffers() const
Gets all child buffers managed by this root.
void clear_renderable_buffers()
Clear the renderable buffers list.
void add_renderable_buffer(const RenderableBufferInfo &info)
Add a buffer to the renderable list.
void set_token_active(bool active) override
Activates/deactivates processing for the current token.
bool is_token_active() const override
Checks if the buffer is active for its assigned token.
std::shared_ptr< BufferProcessor > m_final_processor
Optional final processor (rarely used in graphics)
std::vector< std::shared_ptr< VKBuffer > > m_pending_removal
Buffers pending removal (cleaned up in next process cycle)
Root container for GPU buffer lifecycle management and batch processing.
uint64_t RenderPipelineID
CommandBufferID command_buffer_id
std::shared_ptr< VKBuffer > buffer
std::shared_ptr< Core::Window > target_window
RenderPipelineID pipeline_id
Information about a buffer that's ready to render.