MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Init

Function Init

engine/Poseidon/Dev/Debug/DebugOverlay.cpp:1686–1712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1684}
1685} // namespace
1686
1687void Init(SDL_Window* window, void* glContext)
1688{
1689 if (s_initialized)
1690 return;
1691 s_window = window;
1692
1693 IMGUI_CHECKVERSION();
1694 ImGui::CreateContext();
1695 ImGuiIO& io = ImGui::GetIO();
1696 io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
1697 io.IniFilename = nullptr; // no imgui.ini side-effects
1698 ImGui::StyleColorsDark();
1699
1700 if (!ImGui_ImplSDL3_InitForOpenGL(window, glContext))
1701 {
1702 LOG_ERROR(Graphics, "DebugOverlay: ImGui_ImplSDL3_InitForOpenGL failed");
1703 return;
1704 }
1705 if (!ImGui_ImplOpenGL3_Init("#version 330"))
1706 {
1707 LOG_ERROR(Graphics, "DebugOverlay: ImGui_ImplOpenGL3_Init failed");
1708 return;
1709 }
1710
1711 s_initialized = true;
1712 LOG_INFO(Graphics, "DebugOverlay: ImGui initialized (press Ctrl+` / Ctrl+; to toggle)");
1713}
1714
1715void Shutdown()

Callers 15

AnimationRTWeightsMethod · 0.50
InitMethod · 0.50
Init2Method · 0.50
AnimationInstanceMethod · 0.50
TargetMethod · 0.50
SerializeMethod · 0.50
InitMethod · 0.50
InitMethod · 0.50
InitLinearMethod · 0.50
InitSplineMethod · 0.50
InitMethod · 0.50
InitMethod · 0.50

Calls 1

CreateContextClass · 0.85

Tested by

no test coverage detected