MayaFlux 1.0.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 183 of file ShaderProcessor.cpp.

184{
185 std::string descriptor_name;
186 if (m_auto_bind_index == 0) {
187 descriptor_name = "input";
188 } else if (m_auto_bind_index == 1) {
189 descriptor_name = "output";
190 } else {
191 descriptor_name = "buffer_" + std::to_string(m_auto_bind_index);
192 }
193
194 bind_buffer(descriptor_name, buffer);
196}
std::shared_ptr< NetworkGeometryBuffer > buffer
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(), 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: