MayaFlux 0.1.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 403 of file ImageReader.cpp.

404{
405 if (!m_is_open || !m_image_data) {
406 m_last_error = "No image open";
407 return nullptr;
408 }
409
410 auto tex_buffer = std::make_shared<Buffers::TextureBuffer>(
411 m_image_data->width,
412 m_image_data->height,
413 m_image_data->format,
414 m_image_data->pixels.data());
415
417 "Created TextureBuffer from image: {}x{} ({} bytes)",
418 m_image_data->width, m_image_data->height, tex_buffer->get_size_bytes());
419
420 return tex_buffer;
421}
#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.

Referenced by MayaFlux::load_image_file().

+ Here is the caller graph for this function: