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

◆ InstanceNetworkBuffer()

MayaFlux::Buffers::InstanceNetworkBuffer::InstanceNetworkBuffer ( std::shared_ptr< Nodes::Network::InstanceNetwork network,
float  over_allocate_factor = 1.5F 
)
explicit

Definition at line 15 of file InstanceNetworkBuffer.cpp.

18 : VKBuffer(
19 estimate_vertex_bytes(network, over_allocate_factor),
22 , m_network(std::move(network))
23{
24 if (!m_network) {
25 error<std::invalid_argument>(
27 std::source_location::current(),
28 "InstanceNetworkBuffer: null InstanceNetwork");
29 }
30
31 const auto& slots = m_network->slots();
33 = (!slots.empty() && slots[0].node)
34 ? slots[0].node->get_primitive_topology()
36
37 RenderConfig defaults;
38 defaults.topology = topo;
40 m_render_config = defaults;
41
43
45 "InstanceNetworkBuffer: {} slots, {} bytes estimated",
46 m_network->slot_count(), get_size_bytes());
47}
#define MF_INFO(comp, ctx,...)
Core::GlobalNetworkConfig network
Definition Config.cpp:37
static size_t estimate_vertex_bytes(const std::shared_ptr< Nodes::Network::InstanceNetwork > &network, float factor)
std::shared_ptr< Nodes::Network::InstanceNetwork > m_network
Portal::Graphics::RenderConfig RenderConfig
Definition VKBuffer.hpp:69
vk::DeviceSize get_size_bytes() const
Definition VKBuffer.hpp:279
void set_needs_depth_attachment(bool needs)
Mark this buffer as requiring depth testing when rendered.
Definition VKBuffer.hpp:565
void set_default_render_config(const RenderConfig &config)
Called by derived classes to set their context-specific defaults.
Definition VKBuffer.hpp:595
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.
PrimitiveTopology
Vertex assembly primitive topology.

References MayaFlux::Journal::Buffers, MayaFlux::Buffers::VKBuffer::get_size_bytes(), MayaFlux::Journal::Init, m_network, MayaFlux::Buffers::VKBuffer::m_render_config, MF_INFO, MayaFlux::Buffers::VKBuffer::set_default_render_config(), MayaFlux::Buffers::VKBuffer::set_needs_depth_attachment(), MayaFlux::Portal::Graphics::RenderConfig::topology, and MayaFlux::Portal::Graphics::TRIANGLE_LIST.

+ Here is the call graph for this function: