mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[Feat] (MG_State/Program, DirectGLES): plumb ubo to backend
This commit is contained in:
@@ -208,6 +208,9 @@ namespace MobileGL {
|
||||
auto& ubo = m_program->getUniformBlock(i);
|
||||
m_uniformBlockNameMaxLength = std::max(m_uniformBlockNameMaxLength, (Int)ubo.name.length());
|
||||
m_uniformBlockIndexByName[ubo.name] = i;
|
||||
// if there's binding defined in shader as layout(binding = ...),
|
||||
// retrieve it here
|
||||
m_uniformBlockBinding[i] = ubo.getBinding();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,10 @@ namespace MobileGL {
|
||||
m_uniformBlockBinding[index] = binding;
|
||||
}
|
||||
|
||||
Uint GetUniformBlockBinding(Uint index) const {
|
||||
return m_uniformBlockBinding[index];
|
||||
}
|
||||
|
||||
Vector<Vector<unsigned>>& GetGeneratedSpirv() { return m_generatedSpirv; }
|
||||
|
||||
Uint GetExternalIndex() const { return m_externalIndex; }
|
||||
|
||||
Reference in New Issue
Block a user