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

◆ set_texture()

void MayaFlux::Buffers::FormaProcessor::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 RenderProcessor via bind_texture(). Calling again replaces the pending binding before it has been consumed.

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

Definition at line 78 of file FormaProcessor.cpp.

79{
80 m_pending_texture = PendingTexture { .image = std::move(image), .binding = std::move(binding) };
81 m_texture_dirty.test_and_set(std::memory_order_release);
82}
IO::ImageData image
Definition Decoder.cpp:57
std::optional< PendingTexture > m_pending_texture

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