MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / launchShut

Method launchShut

source/MRViewer/MRViewer.cpp:998–1072  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

996}
997
998void Viewer::launchShut()
999{
1000 if ( !isLaunched_ )
1001 {
1002 spdlog::error( "Viewer is not launched!" );
1003 return;
1004 }
1005 if ( window )
1006 glfwHideWindow( window );
1007
1008 signals_->preShutdownSignal();
1009
1010 if ( settingsMng_ )
1011 {
1012 spdlog::info( "Save user settings." );
1013 settingsMng_->saveSettings( *this );
1014 }
1015
1016 {
1017 spdlog::info( "Wait and process unfinished web requests." );
1018 /// wait for all remaining requests
1019 for ( int i = 0; i < 3; ++i ) // maximum 3 iterations
1020 {
1021 WebRequest::waitRemainingAsync();
1022 if ( CommandLoop::empty() )
1023 break;
1024 CommandLoop::processCommands();
1025 }
1026 }
1027
1028 for ( auto& viewport : viewport_list )
1029 viewport.shut();
1030 shutdownPlugins_();
1031
1032 // Clear plugins
1033 plugins.clear();
1034 menuPlugin_.reset();
1035
1036 // Clear objects
1037 SceneRoot::get().removeAllChildren();
1038 basisAxes.reset();
1039 rotationSphere.reset();
1040 clippingPlaneObject.reset();
1041 globalBasis.reset();
1042 globalHistoryStore_.reset();
1043 basisViewController.reset();
1044
1045 GLStaticHolder::freeAllShaders();
1046
1047 alphaSorter_.reset();
1048 sceneTexture_.reset();
1049 depthPeeler_.reset();
1050
1051 touchpadController_->reset();
1052
1053 dragDropAdvancedHandler_.reset();
1054
1055 glfwDestroyWindow( window );

Callers

nothing calls this directly

Calls 7

saveSettingsMethod · 0.80
shutMethod · 0.80
removeAllChildrenMethod · 0.80
emptyFunction · 0.50
getFunction · 0.50
clearMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected