Commit Graph

9839 Commits

Author SHA1 Message Date
omar 0a811e8ea1 Backends: DX9, DX10, DX11, DX12, Allegro5, OpenGL2, OpenGL3, SDLRenderer2, SDLRenderer3, SDLGPU3, Vulkan: added standard draw callbacks when possible. (#9378) 2026-04-23 21:50:45 +02:00
ocornut 82f46a73f8 (Breaking) Moved ImDrawCallback_ResetRenderState -> ImGui::GetPlatformIO().DrawCallback_ResetRenderState + added room in ImGuiPlatformIO for more standard backend-agnostic draw callbacks. (#9378) 2026-04-23 21:50:41 +02:00
ocornut a6a16cf8a2 Backends: WebGPU: protect better against zero tex id. 2026-04-23 20:50:34 +02:00
ocornut e887098740 Backends: WebGPU: always use SPIR-V shader on WGVK, as it cannot be detected at runtime. (#9316, #9246, #9257)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-04-23 19:42:29 +02:00
ocornut f934719fbf TabBar: comments about ImGuiTabBarFlags_FittingPolicyMixed and TabMinWidthShrink. (#9376, #3421, #8800) 2026-04-23 18:31:53 +02:00
ocornut ce3fe4078a Backends: WGPU: fixed build.
Incorrect line from a WIP branch slipped in ac06ad7
2026-04-23 17:31:14 +02:00
ocornut f2f843c113 Fixed some extremely zealous warnings (GCC -Wconversion, -Wdouble-promotion)
(amend a1e0552)
2026-04-23 17:23:43 +02:00
ocornut adc0027912 Backends: Vulkan: remove unused artefacts (mistakenly commited in 0453ae9). 2026-04-23 16:08:11 +02:00
ocornut ac06ad7b48 ImDrawList: made AddCallback() user data default to NULL + minor amends/comments. 2026-04-23 15:58:44 +02:00
ocornut 4739af2d51 Update VS toolset in all .vcxproj from VS2015 (v140) to VS2017 (v141).
It supports vcpkg.
2026-04-23 15:58:04 +02:00
ocornut b065713cec Backends: OpenGL2/3, SDLRenderer2/3, DirectX9, Metal: moved Init/Shutdown code lower in the file.
Allows to point to local functions without forward declaring them.
2026-04-23 15:53:28 +02:00
ocornut fb308c14ce Remove noise from 0453ae9 + amend comments. (#914)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-22 14:50:15 +02:00
ocornut ac261203a5 (Breaking) Backends: Vulkan: redesigned to use separate ImageView + Sampler instead of Combined Image Sampler. (fixes, amends) (#914) 2026-04-22 14:43:44 +02:00
yaz0r 0453ae96e8 (Breaking) Backends: Vulkan: redesigned to use separate ImageView + Sampler instead of Combined Image Sampler. (WIP) (#914) 2026-04-22 14:43:44 +02:00
ocornut a5fd597be3 Backends: Vulkan: minor changes. 2026-04-22 14:23:42 +02:00
ocornut 382b99c334 PlotHistogram: add comments. (#9372) 2026-04-21 22:32:01 +02:00
ocornut 2d131ef5b7 Backends: Vulkan: renaming and moving code around to reduce diff in upcoming change. Should be no-op.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-21 22:22:06 +02:00
ocornut a1e05521e9 Backends: GLFW: added a Win32-specific implementation of ImGui_ImplGlfw_GetContentScaleXXXX functions for legacy GLFW 3.2. (#9003)
Since we ship GLFW 3.2 binaries for Windows this makes our examples a little better behaving by default.
Ideally we'd use ImGui_ImplWin32_GetDpiScaleForHwnd() and ImGui_ImplWin32_GetDpiScaleForMonitor() but they are too much code to copy.
2026-04-21 17:24:41 +02:00
ocornut d7b40ab9a9 MultiSelect: Box-Select + Tables: Amend ac88294. fix usage of box-selection columns with items straying out of columns. (#7994, #2221)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-20 11:46:36 +02:00
ocornut ac88294b4a MultiSelect: Box-Select +Tables: fix usage of box-selection columns with items straying out of columns. (#7994, #2221)
Use 00d3f9295e.
+ Assets Browser toggle to enable ScrollX.
2026-04-20 11:12:43 +02:00
ocornut ea1c04f7ab Multi-Select + Tables: fixed an issue which could lead to an extra vertical offset in the Header row. (#8250, #7994)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
Because BeginMultiSelect() does `ms->ScopeRectMin = window->DC.CursorMaxPos = window->DC.CursorPos` at a time where CursorPos is already past MaxPos.y because of ItemSpacing.y. Accumulate spacing.
2026-04-17 19:23:10 +02:00
ocornut cdb046ac3f Demo: Assets Browser: fixed not submitting anything after a SetCursorScreenPos() call when no items. Would not manifest because BeginMultiSelect() altered CursorMaxPos. (#5548)
cc: 2819ab32f8, edcd5b113e
2026-04-17 19:23:04 +02:00
ocornut 97939e6837 Multi-Select: Box-Select: fixes for using accross nested child windows. (#8364)
- IsFocused scan nav focus route.
- When covering multiple windows, draw in front most ones (grabbed FindFrontMostVisibleChildWindow() from docking branch).
2026-04-17 16:36:09 +02:00
ocornut c91b03060d Multi-Select: Box-Select: improve dirty unclip rectangle calculation + use in ImGuiMultiSelectFlags_BoxSelect1d mode when needed (e.g. wheel scrolling up). (#7994, #8250, #7821, #7850, #7970)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-04-17 14:38:12 +02:00
ocornut a2eb6d99ed MultiSelect: Box-Select +Tables: revert 4d00bf8ad which seems unneeded since enforce table layout in BeginMultiSelect(). (#7970, #7821).
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-16 23:59:44 +02:00
ocornut a2916923a1 MultiSelect: Box-Select + Clipper: extend UnclipRect by ItemSpacing. (#7994, #8250, #7821, #7850, #7970)
Amend 1ac469b50f
2026-04-16 23:37:46 +02:00
ocornut 2cbdb7a337 TextLink(), BeginCombo(): fixed two remainig instances of needlessly scanning for ##. 2026-04-16 16:47:13 +02:00
ocornut d4783bd553 Added missing Test Engine hooks for PlotXXX(), VSliderXXX(), TableHeader(). 2026-04-16 16:39:07 +02:00
ocornut ce855cada2 Tables, Multi-Select: Fixed an issue using Multi-Select within a Table causing column width measurement to be invalid when trailing column contents is not submitted in the last row. (#9341, #8250)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-04-16 15:21:56 +02:00
ocornut 39e7bf5a08 Separator(): enforce a minimum border size if style.SeparatorSize is 0.0f. (#9369) 2026-04-16 11:32:40 +02:00
ocornut 0e318a5182 Backends: SDL2: Made ImGui_ImplSDL2_GetContentScaleXXX helpers return a minimum of 1.0f, as some Linux setup seems to report <1.0f value and this breaks scaling border size. (#9369) 2026-04-16 11:32:07 +02:00
ocornut 19753a30d8 Multi-Select: Box-Select+Tables: fixed Column return value when UnClipRect is active. (#7994, #8250)
Amend 6ce4b44 + bbd0af7. This probably should be redesigned to be more generic, e.g. move UnclipRect concept outside of Boxselect.
2026-04-15 15:08:49 +02:00
ocornut 6fb74f38af Demo: Assets Browser: make default icon size font dependant. 2026-04-15 14:26:50 +02:00
Andy Grundman 4b80d409e7 Backends: Metal: use a dedicated bufferCacheLock to avoid crashing when bufferCache is replaced by a new object while being used for synchronize(). (#9367)
This also removes the dispatch onto main when adding the finished buffers back into the cache. This operation should be fine to run on any thread as long as it's inside the sync block.
2026-04-14 17:14:08 +02:00
ocornut ed4dd679f1 Fixed vertical scrollbar top coordinates when using thick borders on windows with no title bar and no menu bar. (#9366)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-14 16:39:08 +02:00
ocornut 3cd8683061 Fonts: assert when using MergeMode with an explicit size over a target font with an implicit size, as scale factor are likely erroneous. (#9361)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
2026-04-13 16:45:18 +02:00
ocornut bbd0af7256 Multi-Select: Box-Select+Tables: fixed using BeginMultiSelect() before table layout is locked. (#8250)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-04-13 16:19:45 +02:00
ocornut f83a378d62 TabBar: changed edge's TabItem ClipRect to not pass an inverted PushClipRect().
While not currently a problem, it would be if ImRect::Overlaps() is changed to use <= instead of < (cc: #3976 which deal with Contains but sort of similar topic).
Changing ImDrawList::PushClipRect()'s intersect_with_current_clip_rect path to use ClipRectFull() would also fix this, but it may ambiguous there which behavior would be correct.
Amend 1ec464eb9.
2026-04-13 14:11:19 +02:00
Flyinghead 84b4b35902 Fonts: rework UpdateCurrentFontSize() check. (#9364)
Consistent with line above.
2026-04-13 10:06:59 +02:00
ocornut 2dc64f99bc Minor optimization: reduce redudant label scanning in common widgets.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
Missing stuff from 11de9df.
The 6 remaining use of CalcTextSize(...,true) don't need this.
2026-04-10 18:37:08 +02:00
ocornut 5da7eb0a84 DrawList: remove/strip old FixRectCornerFlags() code.
Amend 44a6b493e
2026-04-10 17:42:13 +02:00
ocornut f678c91617 Multi-Select: disable MultiSelectAddSetRange() attempt at merging consecutive requests submitted from box-selection.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
Essentially reverts 79b77d91c, f904a6646c which did the initial span merging.
Amend and disable change done for f08b33f.
2026-04-09 23:13:15 +02:00
ocornut 6ce4b44547 Mulit-Select: Box-Select: fixed an issue using in a table while relying on the TableNextColumn() return value to perform coarse clipping. (#7994)
This is presumably not sufficient as MultiSelectAddSetRange() is also deficient there.
2026-04-09 23:13:12 +02:00
ocornut f08b33fd0c Multi-Select: Box-Select: fixed an issue where items out of horizontal view would sometimes lead to incorrect merging of sequential selection requests. (#7994, #1861, #6518)
SetNextItemSelectionUserData() could use g.NextItemData.SelectionUserData if we could guarantee if would be valid when nesting multi-select blocks.
But it doesn't make much of a difference as whole ImGuiMultiSelectTempData fits in 2 cache lines.
2026-04-09 22:16:47 +02:00
ocornut b444694b3d Multi-Select: Box-Select: fixed an issue using ImGuiMultiSelectFlags_BoxSelect2d mode, where items out of view wouldn't be properly selected. (#7994, #1861, #6518)
Because BoxSelectRectPrev and BoxSelectRectCurr were clamped to scope boundaries, dragging mouse outside of the scope would usually keep one axis unchanged.
Amend 15391762dd
2026-04-09 21:40:29 +02:00
ocornut 24677c561e Multi-Select: Box-Select: add compile-time debug options. (#7994, #1861, #6518) 2026-04-09 21:40:13 +02:00
ocornut 01a4ad3a50 Docs: update legacy TODO list.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-04-09 15:01:40 +02:00
ocornut f4ed421a88 InputText: CharFilter callback event sets CursorPos/SelectionStart/SelectionEnd. (#816) 2026-04-09 14:54:09 +02:00
ocornut 11de9df44c Minor optimization: reduce redudant label scanning in common widgets. 2026-04-09 14:25:34 +02:00
ocornut c2565fe642 Update ignore list
Add .claude
2026-04-09 13:59:45 +02:00