mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 12:48:32 +09:00
[Fix] (MG_State/Program): does it still crash?
This commit is contained in:
@@ -154,9 +154,13 @@ namespace MobileGL {
|
||||
}
|
||||
m_uboScratch.resize(m_metadata.uboSize, 0);
|
||||
|
||||
m_uniformTypes.resize(uniformOffsets.size());
|
||||
for (const auto& [name, type] : m_metadata.plainUniformMemberTypes) {
|
||||
m_uniformTypes[m_uniforms[name]] = MG_Util::ConvertSpvcTypeToGLEnum(type);
|
||||
auto& types = m_metadata.plainUniformMemberTypes;
|
||||
assert(types.size() == m_uniformOffsets.size());
|
||||
m_uniformTypes.resize(m_uniformOffsets.size());
|
||||
for (const auto& [name, type] : types) {
|
||||
auto gltype = MG_Util::ConvertSpvcTypeToGLEnum(type);
|
||||
auto location = m_uniforms[name];
|
||||
m_uniformTypes[location] = gltype;
|
||||
}
|
||||
}
|
||||
} // namespace GLState
|
||||
|
||||
Reference in New Issue
Block a user