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

◆ NodeTextureBuffer()

MayaFlux::Buffers::NodeTextureBuffer::NodeTextureBuffer ( std::shared_ptr< Nodes::GpuSync::TextureNode node,
std::string  binding_name = "texture" 
)
explicit

Create texture staging buffer from generative node.

Parameters
nodeTextureNode that generates pixels each frame
binding_nameLogical name for this texture binding (default: "texture")

Buffer size is automatically calculated from texture dimensions: width * height * 4 channels * sizeof(float) = RGBA32F format

Definition at line 11 of file NodeTextureBuffer.cpp.

14 : VKBuffer(
18 , m_texture_node(std::move(node))
19 , m_binding_name(std::move(binding_name))
20{
21 if (!m_texture_node) {
22 error<std::invalid_argument>(
25 std::source_location::current(),
26 "Cannot create NodeTextureBuffer with null TextureNode");
27 }
28
30 "Created NodeTextureBuffer '{}' for {}x{} texture ({} bytes)",
32 m_texture_node->get_width(),
33 m_texture_node->get_height(),
35}
#define MF_INFO(comp, ctx,...)
std::shared_ptr< Nodes::GpuSync::TextureNode > m_texture_node
vk::DeviceSize get_size_bytes() const
Definition VKBuffer.hpp:235
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::Buffers, MayaFlux::Buffers::VKBuffer::get_size_bytes(), MayaFlux::Journal::Init, m_binding_name, m_texture_node, and MF_INFO.

+ Here is the call graph for this function: