mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-12 22:50:13 -06:00
Render text informing of ongoing shutdown (#696)
This commit is contained in:
@@ -760,6 +760,11 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) {
|
||||
void OpenSpaceEngine::deinitialize() {
|
||||
LTRACE("OpenSpaceEngine::deinitialize(begin)");
|
||||
|
||||
// We want to render an image informing the user that we are shutting down
|
||||
_renderEngine->renderEndscreen();
|
||||
|
||||
_engine->_windowWrapper->swapBuffer();
|
||||
|
||||
for (const std::function<void()>& func : _engine->_moduleCallbacks.deinitializeGL) {
|
||||
func();
|
||||
}
|
||||
@@ -1235,6 +1240,7 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
if (_shutdown.inShutdown) {
|
||||
if (_shutdown.timer <= 0.f) {
|
||||
_windowWrapper->terminate();
|
||||
return;
|
||||
}
|
||||
_shutdown.timer -= static_cast<float>(_windowWrapper->averageDeltaTime());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user