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

◆ create_texture_buffer()

std::shared_ptr< Buffers::TextureBuffer > MayaFlux::IO::ImageReader::create_texture_buffer ( )

Create a VKBuffer containing the loaded image pixel data.

Returns
VKBuffer with pixel data ready for GPU processing

Creates a buffer suitable for:

  • Transfer operations (upload to VKImage)
  • Direct compute shader processing
  • Buffer processor chains (treat pixels as samples)

Definition at line 663 of file ImageReader.cpp.

664{
665 if (!m_is_open || !m_image_data) {
666 m_last_error = "No image open";
667 return nullptr;
668 }
669
670 auto tex_buffer = std::make_shared<Buffers::TextureBuffer>(
671 m_image_data->width,
672 m_image_data->height,
673 m_image_data->format,
674 m_image_data->data());
675
677 "Created TextureBuffer from image: {}x{} ({} bytes)",
678 m_image_data->width, m_image_data->height, tex_buffer->get_size_bytes());
679
680 return tex_buffer;
681}
#define MF_INFO(comp, ctx,...)
std::optional< ImageData > m_image_data
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.

References MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_image_data, m_is_open, m_last_error, and MF_INFO.