Skip to content

Commit ae49d7a

Browse files
committed
Update imgui to 1.92.9
1 parent f86b9e0 commit ae49d7a

10 files changed

Lines changed: 1537 additions & 714 deletions

File tree

extensions/ImGui/src/ImGui/backends/imgui_impl_axmol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ IMGUI_IMPL_API void ImGui_ImplAxmol_RenderDrawData(ImDrawData* draw_data)
368368
ImVec2 clip_scale = draw_data->FramebufferScale; // (1,1) unless using retina display which are often (2,2)
369369

370370
// Render command lists
371-
for (int n = 0; n < draw_data->CmdListsCount; n++)
371+
for (int n = 0; n < draw_data->CmdLists.size(); n++)
372372
{
373373
const ImDrawList* cmd_list = draw_data->CmdLists[n];
374374

extensions/ImGui/src/ImGui/backends/imgui_impl_glfw.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ struct ImGui_ImplGlfw_Data
261261
bool IsWayland;
262262
bool InstalledCallbacks;
263263
bool CallbacksChainForAllWindows;
264-
char BackendPlatformName[32];
264+
char BackendPlatformName[40];
265265
#ifdef EMSCRIPTEN_USE_EMBEDDED_GLFW3
266266
const char* CanvasSelector;
267267
#endif
@@ -753,7 +753,13 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
753753

754754
// Setup backend capabilities flags
755755
ImGui_ImplGlfw_Data* bd = IM_NEW(ImGui_ImplGlfw_Data)();
756-
snprintf(bd->BackendPlatformName, sizeof(bd->BackendPlatformName), "imgui_impl_glfw (%d)", GLFW_VERSION_COMBINED);
756+
bd->Context = ImGui::GetCurrentContext();
757+
bd->Window = window;
758+
bd->Time = 0.0;
759+
bd->IsWayland = ImGui_ImplGlfw_IsWayland();
760+
ImGui_ImplGlfw_ContextMap_Add(window, bd->Context);
761+
762+
snprintf(bd->BackendPlatformName, sizeof(bd->BackendPlatformName), "imgui_impl_glfw (%d)%s", GLFW_VERSION_COMBINED, bd->IsWayland ? " (Wayland)" : "");
757763
io.BackendPlatformUserData = (void*)bd;
758764
io.BackendPlatformName = bd->BackendPlatformName;
759765
#if GLFW_HAS_CREATECURSOR
@@ -775,12 +781,6 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
775781
io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport; // We can call io.AddMouseViewportEvent() with correct data (optional)
776782
#endif
777783

778-
bd->Context = ImGui::GetCurrentContext();
779-
bd->Window = window;
780-
bd->Time = 0.0;
781-
bd->IsWayland = ImGui_ImplGlfw_IsWayland();
782-
ImGui_ImplGlfw_ContextMap_Add(window, bd->Context);
783-
784784
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
785785
#if GLFW_VERSION_COMBINED < 3300
786786
platform_io.Platform_SetClipboardTextFn = [](ImGuiContext*, const char* text) { glfwSetClipboardString(ImGui_ImplGlfw_GetBackendData()->Window, text); };

extensions/ImGui/src/ImGui/imconfig.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,20 @@
4343
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
4444
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME).
4545
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
46+
//#define IMGUI_DISABLE_TIME_FUNCTIONS // Don't setup default platform_io.Platform_SessionDate value using time(), localtime_r().
4647
//#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS // Don't implement default platform_io.Platform_OpenInShellFn() handler (Win32: ShellExecute(), require shell32.lib/.a, Mac/Linux: use system("")).
4748
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
4849
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
4950
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
5051
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
5152
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
52-
//#define IMGUI_DISABLE_DEFAULT_FONT // Disable default embedded fonts (ProggyClean/ProggyForever), remove ~9 KB + ~14 KB from output binary. AddFontDefaultXXX() functions will assert.
53+
//#define IMGUI_DISABLE_DEFAULT_FONT // Disable default embedded fonts (ProggyClean + ProggyForever). Remove ~9 KB + ~14 KB from output binary. AddFontDefaultXXX() functions will assert.
54+
//#define IMGUI_DISABLE_DEFAULT_FONT_BITMAP // Disable default embedded bitmap font (ProggyClean). Remove ~9 KB from output binary. AddFontDefaultBitmap() will assert.
55+
//#define IMGUI_DISABLE_DEFAULT_FONT_VECTOR // Disable default embedded vector font (ProggyForever), Remove ~14 KB from output binary. AddFontDefaultVector() will assert.
5356
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available
5457

5558
//---- Enable Test Engine / Automation features.
56-
//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_config.h", see Test Engine for details.
59+
//#define IMGUI_ENABLE_TEST_ENGINE // Enable imgui_test_engine hooks. Generally set automatically by include "imgui_te_imconfig.h", see Test Engine for details.
5760

5861
//---- Include imgui_user.h at the end of imgui.h as a convenience
5962
// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included.

0 commit comments

Comments
 (0)