MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / Initialize

Method Initialize

ImGUI GLFW Tutorial/imgui/imgui.cpp:4123–4154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4121}
4122
4123void ImGui::Initialize(ImGuiContext* context)
4124{
4125 ImGuiContext& g = *context;
4126 IM_ASSERT(!g.Initialized && !g.SettingsLoaded);
4127
4128 // Add .ini handle for ImGuiWindow type
4129 {
4130 ImGuiSettingsHandler ini_handler;
4131 ini_handler.TypeName = "Window";
4132 ini_handler.TypeHash = ImHashStr("Window");
4133 ini_handler.ClearAllFn = WindowSettingsHandler_ClearAll;
4134 ini_handler.ReadOpenFn = WindowSettingsHandler_ReadOpen;
4135 ini_handler.ReadLineFn = WindowSettingsHandler_ReadLine;
4136 ini_handler.ApplyAllFn = WindowSettingsHandler_ApplyAll;
4137 ini_handler.WriteAllFn = WindowSettingsHandler_WriteAll;
4138 g.SettingsHandlers.push_back(ini_handler);
4139 }
4140
4141#ifdef IMGUI_HAS_TABLE
4142 // Add .ini handle for ImGuiTable type
4143 TableSettingsInstallHandler(context);
4144#endif // #ifdef IMGUI_HAS_TABLE
4145
4146 // Create default viewport
4147 ImGuiViewportP* viewport = IM_NEW(ImGuiViewportP)();
4148 g.Viewports.push_back(viewport);
4149
4150#ifdef IMGUI_HAS_DOCK
4151#endif // #ifdef IMGUI_HAS_DOCK
4152
4153 g.Initialized = true;
4154}
4155
4156// This function is merely here to free heap allocations.
4157void ImGui::Shutdown(ImGuiContext* context)

Callers

nothing calls this directly

Calls 2

ImHashStrFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected