| 83 | return getActive(GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES, getActive(GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS));} |
| 84 | |
| 85 | std::string UniformBlock::getName() const |
| 86 | { |
| 87 | if (m_identity.isName()) |
| 88 | return m_identity.name(); |
| 89 | |
| 90 | GLint length = getActive(GL_UNIFORM_BLOCK_NAME_LENGTH); |
| 91 | std::vector<char> name(length); |
| 92 | |
| 93 | glGetActiveUniformBlockName(m_program->id(), blockIndex(), length, nullptr, name.data()); |
| 94 | |
| 95 | return std::string(name.data(), length); |
| 96 | } |
| 97 | |
| 98 | |
| 99 | } // namespace globjects |