mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Fix] (MG_State/Program): skip attrib location binding when it is not active at the first place
This commit is contained in:
@@ -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)]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user