|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Uploads concatenated vertex and index data from all MeshNetwork slots. More...
#include <MeshNetworkProcessor.hpp>
Inheritance diagram for MayaFlux::Buffers::MeshNetworkProcessor:
Collaboration diagram for MayaFlux::Buffers::MeshNetworkProcessor:Public Member Functions | |
| MeshNetworkProcessor (std::shared_ptr< Nodes::Network::MeshNetwork > network) | |
| ~MeshNetworkProcessor () override=default | |
Public Member Functions inherited from MayaFlux::Buffers::BufferProcessor | |
| virtual ProcessingToken | get_processing_token () const |
| Gets the current processing token for this buffer. | |
| virtual bool | is_compatible_with (const std::shared_ptr< Buffer > &) const |
| Checks if this processor can handle the specified buffer type. | |
| void | process (const std::shared_ptr< Buffer > &buffer) |
| Applies a computational transformation to the data in the provided buffer. | |
| virtual void | set_processing_token (ProcessingToken token) |
| Gets the preferred processing backend for this processor. | |
| virtual | ~BufferProcessor ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Protected Member Functions | |
| void | on_attach (const std::shared_ptr< Buffer > &buffer) override |
| Called when this processor is attached to a buffer. | |
| void | on_detach (const std::shared_ptr< Buffer > &buffer) override |
| Called when this processor is detached from a buffer. | |
| void | processing_function (const std::shared_ptr< Buffer > &buffer) override |
| The core processing function that must be implemented by derived classes. | |
Protected Member Functions inherited from MayaFlux::Buffers::VKBufferProcessor | |
| void | ensure_initialized (const std::shared_ptr< VKBuffer > &buffer) |
| void | initialize_buffer_service () |
| void | initialize_compute_service () |
Private Member Functions | |
| void | allocate_gpu_buffers (const std::shared_ptr< VKBuffer > &vertex_buf) |
| void | allocate_ssbo_buffers () |
| bool | any_slot_dirty () const |
| void | clear_slot_dirty_flags () |
| void | link_index_resources (const std::shared_ptr< VKBuffer > &vertex_buf) |
| void | push_ssbo_bindings (const std::shared_ptr< VKBuffer > &buffer) |
| size_t | total_index_count () const |
| size_t | total_vertex_bytes () const |
| void | upload_combined (const std::shared_ptr< VKBuffer > &vertex_buf) |
| void | upload_ssbos () |
Private Attributes | |
| std::shared_ptr< VKBuffer > | m_gpu_index_buffer |
| std::vector< uint32_t > | m_index_aggregate |
| std::shared_ptr< VKBuffer > | m_index_staging |
| std::vector< glm::mat4 > | m_model_aggregate |
| CPU-side scratch for model matrices, reused each cycle. | |
| std::shared_ptr< VKBuffer > | m_model_ssbo |
| Per-slot world matrices in sorted_indices order. One mat4 per slot. | |
| std::shared_ptr< Nodes::Network::MeshNetwork > | m_network |
| std::vector< uint32_t > | m_slot_index_aggregate |
| CPU-side scratch for per-vertex slot indices, reused each cycle. | |
| std::shared_ptr< VKBuffer > | m_slot_index_ssbo |
| Per-vertex slot index. One uint32_t per concatenated vertex. | |
| std::vector< uint8_t > | m_vertex_aggregate |
| Aggregate scratch buffers reused each cycle to avoid allocation. | |
| std::shared_ptr< VKBuffer > | m_vertex_staging |
Additional Inherited Members | |
Protected Attributes inherited from MayaFlux::Buffers::VKBufferProcessor | |
| Registry::Service::BufferService * | m_buffer_service = nullptr |
| Registry::Service::ComputeService * | m_compute_service = nullptr |
Protected Attributes inherited from MayaFlux::Buffers::BufferProcessor | |
| ProcessingToken | m_processing_token { ProcessingToken::AUDIO_BACKEND } |
Uploads concatenated vertex and index data from all MeshNetwork slots.
Mirrors MeshProcessor but operates over the full slot list of a MeshNetwork rather than a single MeshBuffer. Each cycle:
The attached VKBuffer (Usage::VERTEX) is the combined vertex buffer. A separate Usage::INDEX VKBuffer is owned by this processor and sized to fit the total index count across all slots.
Partial-range re-upload (dirty slots only) is deferred. Any dirty slot triggers a full re-concatenation, which is correct and cheap for moderate slot counts.
Definition at line 37 of file MeshNetworkProcessor.hpp.