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

◆ bind_diffuse_texture()

void MayaFlux::Buffers::MeshBuffer::bind_diffuse_texture ( std::shared_ptr< Core::VKImage image,
std::string_view  binding_name = "diffuseTex" 
)

Bind a diffuse texture to the render processor, if present.

The binding name must match a descriptor slot in the shader. If the render processor is not yet created, the texture will be bound on creation if the default_texture_binding matches.

Definition at line 188 of file MeshBuffer.cpp.

191{
192 m_diffuse_texture = std::move(image);
193 m_diffuse_binding = std::string(binding_name);
194
195 if (m_render_processor) {
198 } else {
200 "MeshBuffer::bind_diffuse_texture: pipeline was created without "
201 "binding '{}' — call before setup_rendering() for correct results",
203 }
204 }
205}
#define MF_WARN(comp, ctx,...)
IO::ImageData image
Definition Decoder.cpp:64
std::shared_ptr< Core::VKImage > m_diffuse_texture
std::shared_ptr< RenderProcessor > m_render_processor
Definition VKBuffer.hpp:620
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Portal::Graphics::RenderConfig::default_texture_binding, image, m_diffuse_binding, m_diffuse_texture, MayaFlux::Buffers::VKBuffer::m_render_config, MayaFlux::Buffers::VKBuffer::m_render_processor, and MF_WARN.