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

Method locationFor

source/globjects/source/AbstractUniform.cpp:87–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87GLint AbstractUniform::locationFor(const Program *program) const
88{
89 if (m_identity.isLocation())
90 return m_identity.location();
91
92 auto it = m_locations.find(program);
93
94 if (it != m_locations.end())
95 {
96 return it->second;
97 }
98
99 gl::GLint location = program->getUniformLocation(m_identity.name());
100
101 m_locations.emplace(program, location);
102
103 return location;
104}
105
106void AbstractUniform::update(const Program * program, bool invalidateLocation) const
107{

Callers

nothing calls this directly

Calls 5

isLocationMethod · 0.80
getUniformLocationMethod · 0.80
locationMethod · 0.45
endMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected