From 793ecfd199cd14275363bdf5102f071a40b9f29b Mon Sep 17 00:00:00 2001 From: vinsentli Date: Tue, 24 Dec 2024 11:52:25 +0800 Subject: [PATCH] igl | opengl | Reduce vector copying in RenderPipelineState::bindVertexAttributes(). --- src/igl/opengl/RenderPipelineState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/igl/opengl/RenderPipelineState.cpp b/src/igl/opengl/RenderPipelineState.cpp index eeee332444..c6e3e65a76 100644 --- a/src/igl/opengl/RenderPipelineState.cpp +++ b/src/igl/opengl/RenderPipelineState.cpp @@ -275,8 +275,8 @@ void RenderPipelineState::bindVertexAttributes(size_t bufferIndex, size_t buffer } #endif - const auto attribList = static_cast(desc_.vertexInputState.get()) - ->getAssociatedAttributes(bufferIndex); + const auto& attribList = static_cast(desc_.vertexInputState.get()) + ->getAssociatedAttributes(bufferIndex); auto& locations = bufferAttribLocations_[bufferIndex]; // attributeList and locations should have an 1-to-1 correspondence