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

◆ to_image_array() [2/2]

std::shared_ptr< Core::VKImage > MayaFlux::Kakshya::TextureContainer::to_image_array ( const std::shared_ptr< Buffers::VKBuffer > &  staging) const

Upload all layers as a Vulkan 2D array texture, reusing a staging buffer.

Concatenates pixel data from all layers in order (layer 0 first) and refreshes a container-owned array image. The returned VKImage has array_layers == get_layer_count() and an image view of type VK_IMAGE_VIEW_TYPE_2D_ARRAY, making it bindable as sampler2DArray in GLSL.

All layers must have the expected byte count; otherwise this returns null.

Parameters
stagingHost-visible staging VKBuffer sized to at least byte_size() * get_layer_count().
Returns
Cached array image when multiple layers exist, or a cached 2D image for one layer. Null on failure.

Definition at line 402 of file TextureContainer.cpp.

404{
405 return cached_array_image(staging);
406}
std::shared_ptr< Core::VKImage > cached_array_image(const std::shared_ptr< Buffers::VKBuffer > &staging) const

References cached_array_image().

+ Here is the call graph for this function: