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

◆ set_gpu_texture()

void MayaFlux::Buffers::TextureBuffer::set_gpu_texture ( std::shared_ptr< Core::VKImage image)

Inject a pre-existing GPU texture, bypassing TextureProcessor allocation.

Safe to call before or after setup_processors(). When called before setup_processors(), TextureProcessor skips create_gpu_texture() and upload_initial_pixels() because has_texture() returns true. When called after setup_processors(), the RenderProcessor descriptor set is updated immediately so the new image is visible from the next rendered frame.

No pixel upload occurs in either case — the image is assumed to already be resident on the GPU.

Parameters
imageInitialized VKImage. Must not be null.

Definition at line 144 of file TextureBuffer.cpp.

145{
146 m_gpu_texture = std::move(image);
147
149 m_render_processor->bind_texture(
152 }
153}
IO::ImageData image
std::shared_ptr< Core::VKImage > m_gpu_texture
std::shared_ptr< RenderProcessor > m_render_processor

References MayaFlux::Portal::Graphics::RenderConfig::default_texture_binding, image, m_gpu_texture, MayaFlux::Buffers::VKBuffer::m_render_config, and m_render_processor.