| 122 | } |
| 123 | |
| 124 | DrapeEngine::~DrapeEngine() |
| 125 | { |
| 126 | dp::DrapeRoutine::Shutdown(); |
| 127 | |
| 128 | // Call Teardown explicitly! We must wait for threads completion. |
| 129 | m_frontend->Teardown(); |
| 130 | m_backend->Teardown(); |
| 131 | |
| 132 | // Reset thread commutator, it stores BaseRenderer pointers. |
| 133 | m_threadCommutator.reset(); |
| 134 | |
| 135 | // Reset pointers to FrontendRenderer and BackendRenderer. |
| 136 | m_frontend.reset(); |
| 137 | m_backend.reset(); |
| 138 | |
| 139 | gui::DrapeGui::Instance().Destroy(); |
| 140 | m_textureManager->Release(); |
| 141 | } |
| 142 | |
| 143 | void DrapeEngine::RecoverSurface(int w, int h, bool recreateContextDependentResources) |
| 144 | { |