mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
[Feat] (MG_State/Program): GetProgramiv: GL_ACTIVE_UNIFORM_BLOCKS, GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH
This commit is contained in:
@@ -94,6 +94,12 @@ namespace MobileGL {
|
||||
auto& inVar = m_program->getPipeInput(i);
|
||||
m_attribInNameMaxLength = std::max(m_attribInNameMaxLength, (Int)inVar.name.length());
|
||||
}
|
||||
|
||||
int uboCount = m_program->getNumUniformBlocks();
|
||||
for (int i = 0; i < uboCount; i++) {
|
||||
auto& ubo = m_program->getUniformBlock(i);
|
||||
m_uniformBlockNameMaxLength = std::max(m_uniformBlockNameMaxLength, (Int)ubo.name.length());
|
||||
}
|
||||
}
|
||||
|
||||
// void ProgramObject::PreLink() {
|
||||
|
||||
@@ -35,7 +35,9 @@ namespace MobileGL {
|
||||
Bool GetValidateStatus() const { return m_validateStatus; }
|
||||
Int GetActiveAtomicCounterCount() const { return m_program->getNumAtomicCounters(); }
|
||||
Int GetActiveAttributesCount() const { return m_program->getNumPipeInputs(); }
|
||||
Int GetActiveUniformBlocksCount() const { return m_program->getNumUniformBlocks(); }
|
||||
Int GetActiveAttributesMaxLength() const { return m_attribInNameMaxLength; }
|
||||
Int GetActiveUniformBlocksMaxLength() const { return m_uniformBlockNameMaxLength; }
|
||||
private:
|
||||
void DoReflection();
|
||||
// void PreLink();
|
||||
@@ -57,9 +59,10 @@ namespace MobileGL {
|
||||
Vector<Uint> m_uniformOffsets;
|
||||
Vector<Uint8> m_uboScratch;
|
||||
|
||||
Int m_uniformNameMaxLength = 0;
|
||||
Uint m_maxUniformLocation = 0;
|
||||
Int m_uniformNameMaxLength = 0;
|
||||
Int m_attribInNameMaxLength = 0;
|
||||
Int m_uniformBlockNameMaxLength = 0;
|
||||
|
||||
String m_infoLog;
|
||||
Bool m_deleteStatus = false;
|
||||
|
||||
Reference in New Issue
Block a user