diff --git a/src/vkcv/VertexLayout.cpp b/src/vkcv/VertexLayout.cpp index 252973f539af51e67ecb30bbe86717961c3a17d6..dc20966bafcbf3c1f4b32956555c444fbc77962e 100644 --- a/src/vkcv/VertexLayout.cpp +++ b/src/vkcv/VertexLayout.cpp @@ -49,8 +49,8 @@ namespace vkcv { VertexBindings bindings; bindings.reserve(attachments.size()); - for (uint32_t i = 0; i < attachments.size(); i++) { - bindings.push_back(createVertexBinding(i, { attachments [i] })); + for (const auto& attachment : attachments) { + bindings.push_back(createVertexBinding(attachment.inputLocation, { attachment })); } return bindings;