|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| 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 calls TextureLoom::create_2d_array. 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 been populated before calling this. Empty layers contribute zero bytes and will produce incorrect GPU data.
| staging | Host-visible staging VKBuffer sized to at least byte_size(). |
Definition at line 473 of file TextureContainer.cpp.