| 45 | } |
| 46 | |
| 47 | AbyssEngine::~AbyssEngine() { |
| 48 | Common::Log::info("Shutting down..."); |
| 49 | |
| 50 | // NOTE: you MUST clear all SDL2 related resources before tearing down SDL2! --- |
| 51 | _currentScene.reset(nullptr); |
| 52 | _nextScene.reset(nullptr); |
| 53 | _cursorImage = nullptr; |
| 54 | // ----------------------------------------------------------------------------- |
| 55 | |
| 56 | ImGui_ImplSDLRenderer2_Shutdown(); |
| 57 | ImGui_ImplSDL2_Shutdown(); |
| 58 | ImGui::DestroyContext(); |
| 59 | SDL_Quit(); |
| 60 | |
| 61 | Common::Log::info("Shutdown complete"); |
| 62 | } |
| 63 | |
| 64 | void AbyssEngine::render() const { |
| 65 | ImGui_ImplSDLRenderer2_NewFrame(); |