MCPcopy Create free account
hub / github.com/cginternals/globjects / getName

Method getName

source/globjects/source/UniformBlock.cpp:85–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 return getActive(GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES, getActive(GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS));}
84
85std::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

Callers

nothing calls this directly

Calls 4

isNameMethod · 0.80
dataMethod · 0.80
nameMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected