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

Method init

source/MRViewer/ImGuiMenu.cpp:170–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void ImGuiMenu::init( MR::Viewer* _viewer )
171{
172 MR_TIMER;
173 ViewerPlugin::init( _viewer );
174 // Setup ImGui binding
175 if ( _viewer )
176 {
177 IMGUI_CHECKVERSION();
178 if ( !context_ )
179 {
180 // Single global context by default, but can be overridden by the user
181 static ImGuiContext* __global_context = ImGui::CreateContext();
182 context_ = __global_context;
183 }
184 ImGui::GetIO().IniFilename = nullptr;
185#ifdef NDEBUG
186 ImGui::GetIO().ConfigDebugHighlightIdConflicts = false;
187#endif
188 if ( _viewer->isMultiViewportAvailable() && _viewer->getLaunchParams().multiViewport )
189 ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable multi viewports in ImGui
190 ImGui::StyleColorsDark();
191 ImGuiStyle& style = ImGui::GetStyle();
192 style.FrameRounding = 5.0f;
193 updateScaling();
194 reloadFonts();
195
196 connect( _viewer, 0, boost::signals2::connect_position::at_front );
197 }
198
199 sceneObjectsList_ = std::make_shared<SceneObjectsListDrawer>();
200 setupShortcuts_();
201}
202
203void ImGuiMenu::initBackend()
204{

Callers 15

deformers.test.mjsFile · 0.45
TESTFunction · 0.45
TestLaplacianMethod · 0.45
setupWindow_Method · 0.45
launchInit_Method · 0.45
init_Method · 0.45
initPlugins_Method · 0.45
append_viewportMethod · 0.45
EMSCRIPTEN_BINDINGSFunction · 0.45
EMSCRIPTEN_BINDINGSFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 2

initFunction · 0.85

Tested by 2

TESTFunction · 0.36
TestLaplacianMethod · 0.36