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

◆ set_texture()

void MayaFlux::Buffers::DataWriteProcessor::set_texture ( std::shared_ptr< Core::VKImage image,
std::string  binding 
)

Supply a texture to bind on the next graphics tick.

Stores the image and binding name behind an atomic dirty flag. On the next processing_function() call the image is bound to the buffer's RenderProcessor via bind_texture(). The descriptor slot must already exist in the pipeline (declared in the RenderConfig ShaderConfig bindings). Calling again replaces the pending binding before it is consumed.

Parameters
imageGPU image. nullptr clears the binding.
bindingDescriptor name matching the fragment shader.

Definition at line 45 of file DataWriteProcessor.cpp.

46{
47 m_pending_texture = PendingTexture { .image = std::move(image), .binding = std::move(binding) };
48 m_texture_dirty.test_and_set(std::memory_order_release);
49}
IO::ImageData image
Definition Decoder.cpp:57
std::optional< PendingTexture > m_pending_texture

References MayaFlux::Buffers::DataWriteProcessor::PendingTexture::image, image, m_pending_texture, and m_texture_dirty.