MayaFlux 0.4.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 160 of file MeshBuffer.cpp.

163{
164 m_diffuse_texture = std::move(image);
165 m_diffuse_binding = std::string(binding_name);
166
167 if (m_render_processor) {
170 } else {
172 "MeshBuffer::bind_diffuse_texture: pipeline was created without "
173 "binding '{}' — call before setup_rendering() for correct results",
175 }
176 }
177}
#define MF_WARN(comp, ctx,...)
IO::ImageData image
std::shared_ptr< RenderProcessor > m_render_processor
std::shared_ptr< Core::VKImage > m_diffuse_texture
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.

References image, and MF_WARN.