diff --git a/backends/imgui_impl_opengl3.cpp b/backends/imgui_impl_opengl3.cpp index 0bd36347..d3c037f4 100644 --- a/backends/imgui_impl_opengl3.cpp +++ b/backends/imgui_impl_opengl3.cpp @@ -21,6 +21,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) // 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2023-06-20: OpenGL: Fixed erroneous use glGetIntegerv(GL_CONTEXT_PROFILE_MASK) on contexts lower than 3.2. (#6539, #6333) // 2023-05-09: OpenGL: Support for glBindSampler() backup/restore on ES3. (#6375) // 2023-04-18: OpenGL: Restore front and back polygon mode separately when supported by context. (#6333) // 2023-03-23: OpenGL: Properly restoring "no shader program bound" if it was the case prior to running the rendering function. (#6267, #6220, #6224) @@ -307,7 +308,8 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version) } bd->GlVersion = (GLuint)(major * 100 + minor * 10); #if defined(GL_CONTEXT_PROFILE_MASK) - glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &bd->GlProfileMask); + if (bd->GlVersion >= 320) + glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &bd->GlProfileMask); bd->GlProfileIsCompat = (bd->GlProfileMask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0; #endif diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 4228d118..ebc8f8cb 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -134,15 +134,19 @@ Other changes: - IsWindowHovered, IsItemHovered: Assert when passed any unsupported flags. - Tables: Fixed a regression in 1.89.6 leading to the first column of tables with either ScrollX or ScrollY flags from being impossible to resize. (#6503) +- InputText: Fixed not returning true when buffer is cleared by ImGuiInputTextFlags_EscapeClearsAll. (#5688, #2620) - Clipper: Rework inner logic to allow functioning with a zero-clear constructor. This is order to facilitate usage for language bindings (e.g cimgui or dear_binding) where user may not be callinga constructor manually. (#5856) - Modals: In the case of nested modal, made sure that focused or appearing windows are moved below the lowest blocking modal (rather than the highest one). (#4317) +- GetKeyName(): Fixed assert with ImGuiMod_XXX values when IMGUI_DISABLE_OBSOLETE_KEYIO is set. - Debug Tools: Added 'io.ConfigDebugIniSettings' option to save .ini data with extra comments. Currently mainly for inspecting Docking .ini data, but makes saving slower. - Demo: Added more developed "Widgets->Tooltips" section. (#1485) - Backends: OpenGL3: Fixed support for glBindSampler() backup/restore on ES3. (#6375, #6508) [@jsm174] +- Backends: OpenGL3: Fixed erroneous use glGetIntegerv(GL_CONTEXT_PROFILE_MASK) on contexts + lower than 3.2. (#6539, #6333) [@krumelmonster] - Backends: GLFW: Accept glfwGetTime() not returning a monotonically increasing value. This seems to happens on some Windows setup when peripherals disconnect, and is likely to also happen on browser+Emscripten. Matches similar 1.89.4 fix in SDL backend. (#6491) diff --git a/imgui.cpp b/imgui.cpp index 34461adc..bc03acbb 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -8512,7 +8512,7 @@ const char* ImGui::GetKeyName(ImGuiKey key) { ImGuiContext& g = *GImGui; #ifdef IMGUI_DISABLE_OBSOLETE_KEYIO - IM_ASSERT((IsNamedKey(key) || key == ImGuiKey_None) && "Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code."); + IM_ASSERT((IsNamedKeyOrModKey(key) || key == ImGuiKey_None) && "Support for user key indices was dropped in favor of ImGuiKey. Please update backend and user code."); #else if (IsLegacyKey(key)) { diff --git a/imgui.h b/imgui.h index d1b2c2a6..92a71081 100644 --- a/imgui.h +++ b/imgui.h @@ -23,7 +23,7 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') #define IMGUI_VERSION "1.89.7 WIP" -#define IMGUI_VERSION_NUM 18964 +#define IMGUI_VERSION_NUM 18965 #define IMGUI_HAS_TABLE #define IMGUI_HAS_VIEWPORT // Viewport WIP branch #define IMGUI_HAS_DOCK // Docking WIP branch diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 30126d63..8ce91ed5 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -6359,7 +6359,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) ImGui::SameLine(); HelpMarker("Alignment applies when a selectable is larger than its text content."); ImGui::SliderFloat("SeparatorTextBorderSize", &style.SeparatorTextBorderSize, 0.0f, 10.0f, "%.0f"); ImGui::SliderFloat2("SeparatorTextAlign", (float*)&style.SeparatorTextAlign, 0.0f, 1.0f, "%.2f"); - ImGui::SliderFloat2("SeparatorTextPadding", (float*)&style.SeparatorTextPadding, 0.0f, 40.0f, "%0.f"); + ImGui::SliderFloat2("SeparatorTextPadding", (float*)&style.SeparatorTextPadding, 0.0f, 40.0f, "%.0f"); ImGui::SliderFloat("LogSliderDeadzone", &style.LogSliderDeadzone, 0.0f, 12.0f, "%.0f"); ImGui::SeparatorText("Tooltips"); diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index 464c5dc0..d6eef0ba 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -4579,6 +4579,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ // Clear input apply_new_text = ""; apply_new_text_length = 0; + value_changed |= (buf[0] != 0); STB_TEXTEDIT_CHARTYPE empty_string; stb_textedit_replace(state, &state->Stb, &empty_string, 0); } @@ -6288,7 +6289,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l if (flags & ImGuiTreeNodeFlags_Bullet) RenderBullet(window->DrawList, ImVec2(text_pos.x - text_offset_x * 0.5f, text_pos.y + g.FontSize * 0.5f), text_col); else if (!is_leaf) - RenderArrow(window->DrawList, ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y + g.FontSize * 0.15f), text_col, is_open ? ImGuiDir_Down : ImGuiDir_Right, 0.70f); + RenderArrow(window->DrawList, ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y + g.FontSize * 0.15f), text_col, is_open ? ((flags & ImGuiTreeNodeFlags_UpsideDownArrow) ? ImGuiDir_Up : ImGuiDir_Down) : ImGuiDir_Right, 0.70f); if (g.LogEnabled) LogSetNextTextDecoration(">", NULL); RenderText(text_pos, label, label_end, false);