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

◆ set_texture()

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

Supply a texture to bind on the next graphics tick.

Mirrors FormaProcessor::set_texture. Stores the image and binding name behind an atomic dirty flag; processing_function binds it to the buffer's RenderProcessor on the next cycle. The descriptor slot must already exist in the pipeline (declared by GeometryBuffer::setup_rendering). 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 136 of file GeometryBindingsProcessor.cpp.

138{
139 m_pending_texture = PendingTexture {
140 .image = std::move(image),
141 .binding = std::move(binding),
142 };
143 m_texture_dirty.test_and_set(std::memory_order_release);
144}
IO::ImageData image
Definition Decoder.cpp:57

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