[Fix] (MG_State/Program): skip attrib location binding when it is not active at the first place

This commit is contained in:
2025-08-16 22:54:31 +08:00
parent f328f71f62
commit 6416788856
@@ -105,6 +105,8 @@ namespace MobileGL {
assert(location < m_attribs.size());
if (m_attribs[location] != name) {
auto it = std::find(m_attribs.begin(), m_attribs.end(), name);
if (it == m_attribs.end())
continue;
std::swap(m_attribs[location], m_attribs[std::distance(m_attribs.begin(), it)]);
}
}