DearImGui is back again

This commit is contained in:
2025-03-22 17:33:10 +01:00
parent 9a8ab7853a
commit 2208a7200f
6 changed files with 172 additions and 49 deletions

View File

@@ -106,12 +106,6 @@ coven_run :: (game_update_proc: (float), game_editor_update_proc: (float), game_
frame_index += 1;
ImGui_ImplSdl_NewFrame((cast(*SDL_Window_Type)engine.window).sdl_window);
imgui_impldx11_new_frame();
ImGui.NewFrame();
show: bool = true;
ImGui.ShowDemoWindow(*show);
update_input();
@@ -131,7 +125,11 @@ coven_run :: (game_update_proc: (float), game_editor_update_proc: (float), game_
update_console();
#if EDITOR {
ui_begin();
ImGui_ImplSdl_NewFrame((cast(*SDL_Window_Type)engine.window).sdl_window);
imgui_impldx11_new_frame();
ImGui.NewFrame();
//ui_begin();
}
clamped_dt := min(0.4, dt);
@@ -166,18 +164,17 @@ coven_run :: (game_update_proc: (float), game_editor_update_proc: (float), game_
}
#if EDITOR {
ui_end();
ImGui.Render();
}
update_audio(dt);
ImGui.Render();
render();
}
imgui_impldx11_shutdown();
#if WITH_EDITOR {
imgui_impldx11_shutdown();
ImGui.DestroyContext(engine.imgui_context);
}