| 126 | } |
| 127 | |
| 128 | void GL46Engine::Terminate() |
| 129 | { |
| 130 | // The render state objects (and fonts) are destroyed first so that the |
| 131 | // render state objects are removed from the bridges before they are |
| 132 | // cleared later in the destructor. |
| 133 | DestroyDefaultFont(); |
| 134 | DestroyDefaultGlobalState(); |
| 135 | |
| 136 | // Need to remove all the RawBuffer objects used to manage atomic |
| 137 | // counter buffers. |
| 138 | mAtomicCounterRawBuffers.clear(); |
| 139 | |
| 140 | GraphicsObject::UnsubscribeForDestruction(mGOListener); |
| 141 | mGOListener = nullptr; |
| 142 | |
| 143 | DrawTarget::UnsubscribeForDestruction(mDTListener); |
| 144 | mDTListener = nullptr; |
| 145 | |
| 146 | mGOMapMutex.lock(); |
| 147 | if (mGOMap.size() > 0) |
| 148 | { |
| 149 | // Bridge map is nonempty on destruction. |
| 150 | // TODO: In GTL, handle differently. The condition should not occur. |
| 151 | mGOMap.clear(); |
| 152 | } |
| 153 | mGOMapMutex.unlock(); |
| 154 | |
| 155 | mDTMapMutex.lock(); |
| 156 | if (mDTMap.size() > 0) |
| 157 | { |
| 158 | // Draw target map nonempty on destruction. |
| 159 | // TODO: In GTL, handle differently. The condition should not occur. |
| 160 | mDTMap.clear(); |
| 161 | } |
| 162 | mDTMapMutex.unlock(); |
| 163 | |
| 164 | if (mILMap->HasElements()) |
| 165 | { |
| 166 | // Input layout map nonempty on destruction. |
| 167 | // TODO: In GTL, handle differently. The condition should not occur. |
| 168 | mILMap->UnbindAll(); |
| 169 | } |
| 170 | mILMap = nullptr; |
| 171 | } |
| 172 | |
| 173 | uint64_t GL46Engine::DrawPrimitive(VertexBuffer const* vbuffer, IndexBuffer const* ibuffer) |
| 174 | { |
nothing calls this directly
no test coverage detected