MayaFlux 0.1.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 149 of file ShaderProcessor.cpp.

150{
151 std::string descriptor_name;
152 if (m_auto_bind_index == 0) {
153 descriptor_name = "input";
154 } else if (m_auto_bind_index == 1) {
155 descriptor_name = "output";
156 } else {
157 descriptor_name = "buffer_" + std::to_string(m_auto_bind_index);
158 }
159
160 bind_buffer(descriptor_name, buffer);
162}
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: