| 85 | } |
| 86 | |
| 87 | void Graphics::DisposeDevice() |
| 88 | { |
| 89 | if (GPUDevice::Instance) |
| 90 | { |
| 91 | // Clean any danging pointer to last task (might stay if engine is disposing after crash) |
| 92 | GPUDevice::Instance->CurrentTask = nullptr; |
| 93 | |
| 94 | GPUDevice::Instance->Dispose(); |
| 95 | LOG_FLUSH(); |
| 96 | Delete(GPUDevice::Instance); |
| 97 | GPUDevice::Instance = nullptr; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | bool GraphicsService::Init() |
| 102 | { |