| 62 | } |
| 63 | |
| 64 | Program::~Program() |
| 65 | { |
| 66 | for (const auto & uniformPair : m_uniforms) |
| 67 | { |
| 68 | uniformPair.second->deregisterProgram(this); |
| 69 | } |
| 70 | |
| 71 | if (id() == 0) |
| 72 | { |
| 73 | for (const auto & shader : m_shaders) |
| 74 | { |
| 75 | shader->deregisterListener(this); |
| 76 | } |
| 77 | } |
| 78 | else |
| 79 | { |
| 80 | for (const auto & shader : std::set<ref_ptr<Shader>>(m_shaders)) |
| 81 | { |
| 82 | detach(shader); |
| 83 | } |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | void Program::accept(ObjectVisitor & visitor) |
| 88 | { |
nothing calls this directly
no test coverage detected