| 85 | } |
| 86 | |
| 87 | GLint 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 | |
| 106 | void AbstractUniform::update(const Program * program, bool invalidateLocation) const |
| 107 | { |
nothing calls this directly
no test coverage detected