|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Core::VKImage > MayaFlux::Portal::Graphics::TextureLoom::create_2d_array | ( | uint32_t | width, |
| uint32_t | height, | ||
| uint32_t | layers, | ||
| ImageFormat | format = ImageFormat::RGBA8, |
||
| const void * | data = nullptr |
||
| ) |
Create a 2D texture array.
All layers share the same width, height, and format. The image view type is VK_IMAGE_VIEW_TYPE_2D_ARRAY, making it bindable as sampler2DArray in GLSL.
| width | Width in pixels per layer. |
| height | Height in pixels per layer. |
| layers | Number of array layers. Must be > 0. |
| format | Image format (default RGBA8). |
| data | Optional pixel data for all layers concatenated in order (layer 0 first). Must be exactly width * height * bpp(format) * layers bytes when non-null. Pass nullptr to allocate without uploading; the image is transitioned to eShaderReadOnlyOptimal. |
Definition at line 213 of file TextureLoom.cpp.
References calculate_image_size(), height, image, MayaFlux::Kakshya::IMAGE_COLOR, MayaFlux::Journal::ImageProcessing, MayaFlux::Core::BackendResourceManager::initialize_image(), is_initialized(), m_resource_manager, m_textures, MF_ERROR, MF_INFO, MayaFlux::Journal::Portal, MayaFlux::Core::VKImage::TEXTURE_2D, to_vulkan_format(), MayaFlux::Core::BackendResourceManager::transition_image_layout(), MayaFlux::Core::VKImage::TYPE_2D, upload_data(), and width.
Here is the call graph for this function: