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

◆ resolve_graphics_read()

std::optional< Kakshya::DataVariant > MayaFlux::Kriya::detail::resolve_graphics_read ( Buffers::DataReadProcessor &  reader)

Finish the pending read as one DataVariant.

Pixels yield their typed storage, a mesh yields its interleaved vertex bytes, and any other read yields raw bytes. Returns nullopt while nothing is ready.

Definition at line 79 of file PipelineGraphicsData.cpp.

80{
81 if (auto image = reader.resolve_pixels()) {
82 return std::visit([](auto& storage) { return Kakshya::DataVariant { std::move(storage) }; },
83 image->pixels);
84 }
85
86 if (auto mesh = reader.resolve_mesh()) {
87 return std::move(mesh->vertex_variant);
88 }
89
90 return reader.resolve_bytes();
91}
IO::ImageData image
Definition Decoder.cpp:47
SampleStorage storage
std::optional< Kakshya::DataVariant > resolve_bytes()
Finish the read as raw bytes.
std::optional< Kakshya::ImageData > resolve_pixels()
Finish a pixel read as typed ImageData with its format and dimensions.
std::optional< Kakshya::MeshData > resolve_mesh()
Finish a read_mesh() read as MeshData.
std::variant< std::vector< double >, std::vector< float >, std::vector< uint8_t >, std::vector< uint16_t >, std::vector< uint32_t >, std::vector< std::complex< float > >, std::vector< std::complex< double > >, std::vector< glm::vec2 >, std::vector< glm::vec3 >, std::vector< glm::vec4 >, std::vector< glm::mat4 > > DataVariant
Multi-type data storage for different precision needs.
Definition NDData.hpp:70

References image, MayaFlux::Buffers::DataReadProcessor::resolve_bytes(), MayaFlux::Buffers::DataReadProcessor::resolve_mesh(), MayaFlux::Buffers::DataReadProcessor::resolve_pixels(), and storage.

+ Here is the call graph for this function: