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

◆ on_detach()

void MayaFlux::Buffers::MeshNetworkProcessor::on_detach ( const std::shared_ptr< Buffer > &  )
overrideprotectedvirtual

Called when this processor is detached from a buffer.

Parameters
bufferBuffer this processor is being detached from

Provides an opportunity for the processor to clean up buffer-specific state or release resources. With expanded processor capabilities, this method should also:

  • Release Hardware Resources: Clean up GPU memory, CUDA contexts, or other acceleration resources
  • Finalize Backend Operations: Ensure all pending backend operations are completed
  • Reset Processing State: Clear any buffer-specific optimization parameters or cached data
  • Restore Default Backend: Return to default processing backend if override was applied
  • Synchronize Operations: Ensure all parallel processing operations have completed

Default implementation does nothing, but proper resource management in derived classes is crucial for optimal performance and preventing resource leaks.

Reimplemented from MayaFlux::Buffers::BufferProcessor.

Definition at line 55 of file MeshNetworkProcessor.cpp.

56{
57 m_gpu_index_buffer.reset();
58 m_vertex_staging.reset();
59 m_index_staging.reset();
60 m_model_ssbo.reset();
61 m_slot_index_ssbo.reset();
62}
std::shared_ptr< VKBuffer > m_slot_index_ssbo
Per-vertex slot index. One uint32_t per concatenated vertex.
std::shared_ptr< VKBuffer > m_model_ssbo
Per-slot world matrices in sorted_indices order. One mat4 per slot.

References m_gpu_index_buffer, m_index_staging, m_model_ssbo, m_slot_index_ssbo, and m_vertex_staging.