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

◆ TextureBindBuffer()

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

Create texture 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)

Definition at line 10 of file TextureBindBuffer.cpp.

12 : VKBuffer(
16 , m_texture_node(std::move(node))
17 , m_binding_name(std::move(binding_name))
18{
19 if (!m_texture_node) {
20 error<std::invalid_argument>(
23 std::source_location::current(),
24 "Cannot create TextureBindBuffer with null TextureNode");
25 }
26
28 "Created TextureBindBuffer '{}' for {}x{} texture ({} bytes)",
30 m_texture_node->get_width(),
31 m_texture_node->get_height(),
33}
#define MF_INFO(comp, ctx,...)
std::shared_ptr< Nodes::GpuSync::TextureNode > m_texture_node
static size_t calculate_buffer_size(const std::shared_ptr< Nodes::GpuSync::TextureNode > &node)
Calculate texture buffer size from node dimensions.
@ STAGING
Host-visible staging buffer (CPU-writable)
vk::DeviceSize get_size_bytes() const
Definition VKBuffer.hpp:221
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.
@ IMAGE_COLOR
2D RGB/RGBA image

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: