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

◆ set_texture()

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

Supply a texture to be bound on the next graphics tick.

The image is owned externally — a TextBuffer's VKImage from InkPress, a loaded asset, a render target, anything. FormaProcessor forwards it to the RenderProcessor on the next processing_function call. Calling again replaces the previous binding.

Parameters
imageGPU image to bind. nullptr clears the binding.
bindingDescriptor name in the shader (e.g. "texSampler").

Definition at line 160 of file FormaBuffer.cpp.

161{
162 if (!m_processor) {
163 m_pending_textures.emplace_back(std::move(image), std::move(binding));
165 "FormaBuffer::set_texture called before setup_processors, storing texture for later submission");
166 return;
167 }
168 m_processor->set_texture(std::move(image), std::move(binding));
169}
#define MF_RT_TRACE(comp, ctx,...)
IO::ImageData image
Definition Decoder.cpp:57
std::shared_ptr< Buffers::FormaProcessor > m_processor
std::vector< std::pair< std::shared_ptr< Core::VKImage >, std::string > > m_pending_textures
Textures from set_texture() before setup_processors(). Drained in setup_processors().
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, image, m_pending_textures, m_processor, and MF_RT_TRACE.