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

◆ auto_bind_buffer()

void MayaFlux::Buffers::ShaderProcessor::auto_bind_buffer ( const std::shared_ptr< VKBuffer > &  buffer)

Auto-bind buffer based on attachment order.

Parameters
bufferBuffer to auto-bind

First attachment -> "input" or first binding Second attachment -> "output" or second binding Useful for simple single-buffer or input/output patterns.

Definition at line 176 of file ShaderProcessor.cpp.

177{
178 std::string descriptor_name;
179 if (m_auto_bind_index == 0) {
180 descriptor_name = "input";
181 } else if (m_auto_bind_index == 1) {
182 descriptor_name = "output";
183 } else {
184 descriptor_name = "buffer_" + std::to_string(m_auto_bind_index);
185 }
186
187 bind_buffer(descriptor_name, buffer);
189}
void bind_buffer(const std::string &descriptor_name, const std::shared_ptr< VKBuffer > &buffer)
Bind a VKBuffer to a named shader descriptor.

References bind_buffer(), and m_auto_bind_index.

Referenced by on_attach().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: