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

◆ ensure_array()

void MayaFlux::Buffers::TextureArrayBuffer::ensure_array ( )
private

Definition at line 297 of file TextureArrayBuffer.cpp.

298{
299 if (has_texture()) {
300 return;
301 }
302
304 auto image = loom.create_2d_array(get_width(), get_height(), m_layers, get_format());
305 if (!image) {
307 "TextureArrayBuffer: failed to create a {} layer array image", m_layers);
308 return;
309 }
310
311 set_gpu_texture(std::move(image));
312}
#define MF_ERROR(comp, ctx,...)
IO::ImageData image
Definition Decoder.cpp:47
void set_gpu_texture(std::shared_ptr< Core::VKImage > image)
Inject a pre-existing GPU texture, bypassing TextureProcessor allocation.
Portal::Graphics::ImageFormat get_format() const
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
MAYAFLUX_API TextureLoom & get_texture_manager()
Get the global texture manager instance.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Buffers::TextureBuffer::get_format(), MayaFlux::Buffers::TextureBuffer::get_height(), MayaFlux::Portal::Graphics::get_texture_manager(), MayaFlux::Buffers::TextureBuffer::get_width(), MayaFlux::Buffers::TextureBuffer::has_texture(), image, m_layers, MF_ERROR, and MayaFlux::Buffers::TextureBuffer::set_gpu_texture().

Referenced by enter_layer_mode(), setup_processors(), and setup_rendering().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: