update dear imgui from 1.92.2b-docking to 1.92.6-docking

This commit is contained in:
Sven Balzer
2026-04-01 18:20:04 +02:00
parent 3b7d593f4e
commit 1daf4d79f1
127 changed files with 10702 additions and 3505 deletions
+3 -1
View File
@@ -100,6 +100,7 @@ List of Renderer Backends:
List of high-level Frameworks Backends (combining Platform + Renderer):
imgui_impl_allegro5.cpp
imgui_impl_null.cpp
Emscripten is also supported!
The SDL2+GL, SDL3+GL, GLFW+GL and GLFW+WebGPU examples are all ready to build and run with Emscripten.
@@ -182,6 +183,7 @@ The Platform backends in impl_impl_XXX.cpp files contain many implementations.
- `ImGuiBackendFlags_HasSetMousePos`: supports io.WantSetMousePos requests to reposition the OS mouse position (only used if io.ConfigNavMoveSetMousePos is set).
- `ImGuiBackendFlags_PlatformHasViewports` supports multiple viewports. (multi-viewports only)
- `ImGuiBackendFlags_HasMouseHoveredViewport` supports calling io.AddMouseViewportEvent() with the viewport under the mouse. IF POSSIBLE, ignore viewports with the ImGuiViewportFlags_NoInputs flag. If this cannot be done, Dear ImGui needs to use a flawed heuristic to find the viewport under mouse position, as it doesn't know about foreign windows. (multi-viewports only)
- `ImGuiBackendFlags_HasParentViewport` supports honoring viewport->ParentViewportId value, by applying the corresponding parent/child relation at the Platform level.
**In your `ImGui_ImplXXX_NewFrame()` function:**
- Set `io.DeltaTime` to the time elapsed (in seconds) since last frame.
@@ -336,7 +338,7 @@ void MyImGuiBackend_UpdateTexture(ImTextureData* tex)
{
// Create texture based on tex->Width, tex->Height.
// - Most backends only support tex->Format == ImTextureFormat_RGBA32.
// - Backends for particularly memory constrainted platforms may support tex->Format == ImTextureFormat_Alpha8.
// - Backends for particularly memory constrained platforms may support tex->Format == ImTextureFormat_Alpha8.
// Upload all texture pixels
// - Read from our CPU-side copy of the texture and copy to your graphics API.
+720 -11
View File
@@ -35,6 +35,708 @@ HOW TO UPDATE?
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.92.6 (2026-02-17)
-----------------------------------------------------------------------
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.6
Breaking Changes:
- Fonts:
- AddFontDefault() now automatically selects an embedded font between:
- AddFontDefaultBitmap(): classic pixel-clean font. Recommended at Size 13px with no scaling.
- AddFontDefaultVector(): new scalable font. Recommended at any higher size.
- The default selection is based on (style.FontSizeBase * FontScaleMain * FontScaleDpi)
reaching a small threshold, but old codebases may not set any of them properly.
As as a result, it is likely that old codebase may still default to AddFontDefaultBitmap().
- Prefer explicitly calling either of them based on your own logic!
You can call AddFontDefaultBitmap() to ensure legacy behavior.
- Fixed handling of `ImFontConfig::FontDataOwnedByAtlas = false` which did
erroneously make a copy of the font data, essentially defeating the purpose
of this flag and wasting memory (undetected since July 2015 and now spotted
by @TellowKrinkle, this is perhaps the oldest bug in Dear ImGui history,
albeit for a rarely used feature!) (#9086, #8465)
HOWEVER, fixing this bug is likely to surface bugs in user/app code:
- Prior to 1.92, font data only needs to be available during the atlas->AddFontXXX() call.
Since 1.92, font data needs to available until atlas->RemoveFont(), or more typically
until a shutdown of the owning context or font atlas.
- The fact that handling of `FontDataOwnedByAtlas = false` was broken bypassed
the issue altogether.
- Removed ImFontConfig::PixelSnapV added in 1.92 which turns out is unnecessary
(and misdocumented). Post-rescale GlyphOffset is always rounded.
- Popups: changed compile-time 'ImGuiPopupFlags popup_flags = 1' default value to be '= 0' for
BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid(), OpenPopupOnItemClick().
The default value has same meaning before and after. (#9157, #9146)
- Before this version, those functions had a 'ImGuiPopupFlags popup_flags = 1' default
value in their function signature. This was introduced by a change on 2020/06/23 (1.77)
while changing the signature from 'int mouse_button' to 'ImGuiPopupFlags popup_flags'
and trying to preserve then-legacy behavior.
- We have now changed this behavior to: cleanup a very old API quirk, facilitate use by
bindings, and to remove the last and error-prone non-zero default value. Also because we
deemed it extremely rare to use those helper functions with the Left mouse button!
As using the LMB would generally be triggered via another widget,
e.g. a Button() + a OpenPopup()/BeginPopup() call.
- Before: The default = 1 means ImGuiPopupFlags_MouseButtonRight.
Explicitly passing a literal 0 means ImGuiPopupFlags_MouseButtonLeft.
- After: The default = 0 means ImGuiPopupFlags_MouseButtonRight.
Explicitly passing a literal 1 also means ImGuiPopupFlags_MouseButtonRight
(if legacy behavior are enabled) or will assert (if legacy behavior are disabled).
- TL;DR: if you don't want to use right mouse button for popups, always specify it
explicitly using a named ImGuiPopupFlags_MouseButtonXXXX value.
Recap:
- BeginPopupContextItem("foo"); // Behavior unchanged (use Right button)
- BeginPopupContextItem("foo", ImGuiPopupFlags_MouseButtonLeft); // Behavior unchanged (use Left button)
- BeginPopupContextItem("foo", ImGuiPopupFlags_MouseButtonLeft | xxx); // Behavior unchanged (use Left button + flags)
- BeginPopupContextItem("foo", ImGuiPopupFlags_MouseButtonRight | xxx); // Behavior unchanged (use Right button + flags)
- BeginPopupContextItem("foo", 1); // Behavior unchanged (as a courtesy we legacy interpret 1 as ImGuiPopupFlags_MouseButtonRight, will assert if disabling legacy behaviors.
- BeginPopupContextItem("foo", 0); // !! Behavior changed !! Was Left button. Now will defaults to Right button! --> Use ImGuiPopupFlags_MouseButtonLeft.
- BeginPopupContextItem("foo", ImGuiPopupFlags_NoReopen); // !! Behavior changed !! Was Left button + flags. Now will defaults to Right button! --> Use ImGuiPopupFlags_MouseButtonLeft | xxx.
- Commented out legacy names obsoleted in 1.90 (Sept 2023):
- BeginChildFrame() --> BeginChild() with ImGuiChildFlags_FrameStyle flag.
- EndChildFrame() --> EndChild().
- ShowStackToolWindow() --> ShowIDStackToolWindow().
- IM_OFFSETOF() --> offsetof().
- IM_FLOOR() --> IM_TRUNC() [internal, for positive values only]
- Hashing: handling of "###" operator to reset to seed within a string identifier
doesn't include the "###" characters in the output hash anymore:
Before: `GetID("Hello###World") == GetID("###World") != GetID("World")`
After: `GetID("Hello###World") == GetID("###World") == GetID("World")`
- This has the property of facilitating concatenating and manipulating
identifiers using "###", and will allow fixing other dangling issues.
- This will invalidate hashes (stored in .ini data) for Tables and Windows
that are using the "###" operators. (#713, #1698)
- Renamed helper macro IM_ARRAYSIZE() -> IM_COUNTOF(). Kept redirection/legacy name.
- Backends:
- Vulkan: optional ImGui_ImplVulkanH_DestroyWindow() helper used by our example
code does not call vkDestroySurfaceKHR(): because surface is created by caller
of ImGui_ImplVulkanH_CreateOrResizeWindow(), it is more consistent. (#9163)
Other Changes:
- Fonts:
- Added `AddFontDefaultVector()`: a new embedded monospace scalable font: ProggyForever!
From https://github.com/ocornut/proggyforever:
"ProggyForever is an MIT-licensed partial reimplementation of the ProggyVector
font (originally by Tristan Grimmer), which itself is a vector-based
reinterpretation of the ProggyClean bitmap font that happily served as
Dear ImGui default font for over 10 years." [...]
"I commissioned Thiebault Courot to recreate this, applied various minor tweaks
and fixes, and reworked his editing pipeline toward shipping FontForge source
files so we can allow and track future changes."
- TL;DR; there was no strictly MIT-licensed matching font. We made it!
- The font data was carefully subsetted, trimmed and compressed so the embedded
data is ~14 KB. Embedding a scalable default font ensures that Dear ImGui can
be easily and readily used in all contexts, even without file system access.
- As always you can opt-out of the embedded font data if desired.
- `AddFontDefault()` now automatically selects an embedded font between
the classic pixel-looking one and the new scalable one.
Prefer calling `AddFontDefaultVector()` or `AddFontDefaultBitmap()` explicitely.
- Fixed a crash when trying to use `AddFont()` with `MergeMode==true` on a font that
has already been rendered. (#9162) [@ocornut, @cyfewlp]
- Fixed an issue where using `PushFont()` from the implicit/fallback "Debug" window
when its recorded state is collapsed would incorrectly early out. This would break
e.g. using direct draw-list calls such as GetForegroundDrawList() with current font.
(#9210, #8865)
- Fixed an issue related to `EllipsisChar` handling, while changing
font loader or font loader flags dynamically in Style->Fonts menus.
- imgui_freetype: fixed overwriting `ImFontConfig::PixelSnapH` when hinting
is enabled, creating side-effects when later disabling hinting or
dynamically switching to stb_truetype rasterizer.
- Post rescale `ImFontConfig::GlyphOffset` is always rounded.
- Adding new fonts after removing all fonts mid-frame properly updates current state.
- Textures:
- Fixed a building issue when `ImTextureID` is defined as a struct.
- Fixed displaying texture # in Metrics/Debugger window.
- Menus:
- Fixed `MenuItem()` label position and `BeginMenu()` arrow/icon/popup positions,
when used inside a line with a baseline offset.
- Made navigation into menu-bar auto wrap on X axis. (#9178)
- TreeNode:
- Fixed highlight position when used inside a line with a large text baseline offset.
(never quite worked in this situation; but then most of the time the text
baseline offset ends up being zero or `FramePadding.y` for a given line).
- Tables:
- Fixed an issue where a very thin scrolling table would advance parent layout
slightly differently depending on its visibility (caused by a mismatch
between hard minimum window size and table minimum size).
- Fixed an issue where submitting non-integer row heights would eventually
advance table parent layout by +0/+1 depending on its visibility.
- Fixed losing stored display order when reducing column count or when .ini
data has missing or duplicate values. (#9108, #4046)
- ColorEdit:
- Added R/G/B/A color markers next to each component (enabled by default).
- Added `ImGuiColorEditFlags_NoColorMarkers` to disable them.
- Added `style.ColorMarkerSize` to configure width of color component markers.
- Sliders, Drags:
- Added `ImGuiSliderFlags_ColorMarkers` to opt-in adding R/G/B/A color markers
next to each components, in multi-components functions.
- Added a way to select a specific marker color.
- InputText:
- InputTextMultiline(): fixed a minor bug where Shift+Wheel would allow a small
horizontal scroll offset when there should be none. (#9249)
- ImGuiInputTextCallbackData: `SelectAll()` also sets `CursorPos` to `SelectionEnd`.
- ImGuiInputTextCallbackData: Added `SetSelection()` helper.
- ImGuiInputTextCallbackData: Added `ID` and `EventActivated` members. (#9174)
- Text, InputText:
- Reworked word-wrapping logic:
- Try to not wrap in the middle of contiguous punctuations. (#8139, #8439, #9094)
- Try to not wrap between a punctuation and a digit. (#8503)
- Inside `InputTextMultiline()` with WordWrap enabled: prefer keeping blanks at
the end of a line rather than at the beginning of next line. (#8990, #3237)
- Fixed low-level word-wrapping function reading from `*text_end` when passed
a string range. (#9107) [@achabense]
- Changed `RenderTextEllipsis()` logic to not trim trailing blanks before
the ellipsis, making ellipsis position more consistent and not arbitrary
hiding the possibility of multiple blanks. (#9229)
- Nav:
- Fixed remote/shortcut InputText() not teleporting mouse cursor when
nav cursor is visible and `io.ConfigNavMoveSetMousePos` is enabled.
- Fixed a looping/wrapping issue when used in menu layer. (#9178)
- Fixed speed scale for resizing/moving with keyboard/gamepad. We incorrectly
used `io.DisplayFramebufferScale` as a scaling factor (very old code),
effectively making those actions faster on macOS/iOS retina screens.
(changed this to use a style scale factor that's not fully formalized yet)
- Fixed an UBSan warning when using in a `ImGuiListClipper` region . (#9160)
- Scrollbar: fixed a codepath leading to a divide-by-zero (which would not be
noticeable by user but detected by sanitizers). (#9089) [@judicaelclair]
- InvisibleButton: allow calling with size (0,0) to fit to available content
size. (#9166, #7623)
- Tooltips, Disabled: fixed `EndDisabledOverrideReenable()` assertion when
nesting a tooltip in a disabled block. (#9180, #7640) [@RegimantasSimkus]
- Added `GetItemFlags()` in public API for consistency and to expose generic
flags of last submitted item. (#9127)
- Misc: fixed build on ARM64/ARM64EC targets trying to use SSE/immintrin.h.
(#9209, #5943, #4091) [@navvyswethgraphics]
- Log/Capture:
- Fixed erroneously injecting extra carriage returns in output text buffer
when `ItemSpacing.y` > `FramePadding.y + 1` while emitting items.
- Images:
- Added `style.ImageRounding`, `ImGuiStyleVar_ImageRounding `to configure
rounding of `Image()` widgets. (#2942, #845)
- `ImageButton()` doesn't use a clamped `style.FrameRounding` value but instead
adjust inner image rounding when `FramePadding > `FrameRounding`. (#2942, #845)
- Shortcuts:
- IsItemHovered() without `ImGuiHoveredFlags_AllowWhenBlockedByActiveItem`
doesn't filter out the signal when activated item is a shortcut remote activation;
(which mimicks what's done internally in the `ItemHoverable()` function). (#9138)
- Fixed tooltip placement being affected for a frame when located over an item
activated by `SetNextItemShortcut()`. (#9138)
- Error Handling:
- Improved error handling and recovery for `EndMenu()`/`EndCombo()`. (#1651, #9165, #8499)
- Improved error handling and recovery for `TableSetupColumn()`.
- Debug Tools:
- Debug Log: fixed incorrectly printing characters in IO log when submitting
non-ASCII values to `io.AddInputCharacter()`. (#9099)
- Debug Log: can output to debugger on Windows via Win32 `OutputDebugString()` (#5855)
- Demo:
- Slightly improve `Selectable()` demos. (#9193)
- Backends:
- DirectX10: added `SamplerNearest` in `ImGui_ImplDX10_RenderState`.
(+renamed `SamplerDefault` to `SamplerLinear`, which was tagged as beta API)
- DirectX11: added `SamplerNearest` in ImGui_ImplDX11_RenderState.
(+renamed `SamplerDefault` to `SamplerLinear`, which was tagged as beta API)
- GLFW: Avoid repeated `glfwSetCursor()` / `glfwSetInputMode()` unnecessary calls.
Lowers overhead for very high framerates (e.g. 10k+ FPS). [@maxliani]
- GLFW: Added `IMGUI_IMPL_GLFW_DISABLE_X11` / `IMGUI_IMPL_GLFW_DISABLE_WAYLAND` to
forcefully disable either. (#9109, #9116)
Try to set them automatically if headers are not accessible. (#9225)
- OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some
platforms. (#8792, #9112)
- SDL2, SDL3: changed `GetClipboardText()` handler to return NULL on error aka
clipboard contents is not text. Consistent with other backends. (#9168)
- SDL2, SDL3: systems other than X11 are back to starting mouse capture on mouse down
(reverts 1.91.9 change). Only X11 requires waiting for a drag by default (not ideal,
but a better default for X11 users). Waiting for a drag to start mouse capture leads to
input drops when dragging after clicking on the edge of a window.
(#3650, #6410, #9235, #3956, #3835)
- SDL2, SDL3: added `ImGui_ImplSDL2_SetMouseCaptureMode()`/`ImGui_ImplSDL3_SetMouseCaptureMode()`
function for X11 users to disable mouse capturing/grabbing. (#3650, #6410, #9235, #3956, #3835)
- When attached to a debugger may want to call:
- `ImGui_ImplSDL3_SetMouseCaptureMode(ImGui_ImplSDL3_MouseCaptureMode_Disabled);`
- But you can also configure your system or debugger to automatically release
mouse grab when crashing/breaking in debugger, e.g.
- console: `setxkbmap -option grab:break_actions && xdotool key XF86Ungrab`
- or use a GDB script to call SDL_CaptureMouse(false). See #3650.
- On platforms other than X11 this is unnecessary.
- SDL_GPU3: added `SamplerNearest` in `ImGui_ImplSDLGPU3_RenderState`.
- SDL_GPU3: macOS version can use MSL shaders in order to support macOS 10.14+
(vs Metallib shaders requiring macOS 14+). Requires application calling
`SDL_CreateGPUDevice()` with `SDL_GPU_SHADERFORMAT_MSL`. (#9076) [@Niminem]
- Vulkan: helper for creating a swapchain (used by examples and multi-viewports)
selects `VkSwapchainCreateInfoKHR`'s `compositeAlpha` value based on
`cap.supportedCompositeAlpha`, which seems to be required on some Android
devices. (#8784) [@FelixStach]
- WebGPU: fixes for Emscripten 5.0.0 (note: current examples do not build with 5.0.1).
- Win32: handle `WM_IME_CHAR`/`WM_IME_COMPOSITION` to support Unicode inputs on
MBCS (non-Unicode) Windows. (#9099, #3653, #5961) [@ulhc, @ocornut, @Othereum]
- Win32: minor optimization not submitting gamepad input if packet number has not
changed (reworked previous 1.92.4). (#9202, #8556) [@AhmedSamyMousa, @MidTerm-CN]
- Examples:
- Win32+DirectX12: ignore seemingly incorrect `D3D12_MESSAGE_ID_FENCE_ZERO_WAIT`
warning on startups on some setups. (#9084, #9093) [@RT2Code, @LeoGautheron]
Docking+Viewports Branch:
- Docking:
- Fixed various rendering issues and ability to have rounded floating dock nodes.
(#6993, #6151) - please note that rounding is still disabled on standalone
viewports.
- Fixed implicit/fallback "Debug" window from staying visible if once docked. (#9151)
- Demo: rework 'Dockspace' demo to increase clarity and put more emphasis on the
basic path of simply calling `DockSpaceOverViewport()`.
- Viewports:
- Fixed a regression in 1.92.4 where partially moving a floating docking node
with horizontal/vertical split over the main viewport would set the window in
an invalid state in some situations, making user unable to further interact
with the window.
- Fixed a regression in 1.92.4 which could cause combos/popups window from
appearing under their parent viewport if their geometry overlapped the main
viewport. (#8948, #9172, #9131, #9128)
- Fixed an assert in background dimming code, which could trigger after using
gamepad/keyboard to move a window to another viewport. (#9053) [@lut0pia, @ocornut]
- Backends:
- GLFW: dynamically load X11 functions to avoid `-lx11` linking requirement introduced
in 1.92.3. (#9116, #9109) [@ramenguy99]
- GLFW: improve workarounds for cases where GLFW is unable to provide reliable monitor
info. Preserve existing monitor list when none of the new one is valid. (#9195, #7902, #5683)
- SDL2, SDL3: adjust IME offset to match other backends and master branch. (#6071, #1953)
- Win32: viewports created by backend forcefully direct messages to
`DefWindowProcW()` in order to support Unicode text input. (#9099, #3653, #5961) [@ulhc]
- Win32: fixed an issue from 1.90.5 where newly appearing windows that are not parented
to the main viewport didn't have their task bar icon appear before the window was
explicitly refocused. (#7354, #8669)
-----------------------------------------------------------------------
VERSION 1.92.5 (Released 2025-11-20)
-----------------------------------------------------------------------
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.5
Breaking Changes:
- Keys: commented out legacy names which were obsoleted in 1.89.0 (August 2022).
- ImGuiKey_ModCtrl --> ImGuiMod_Ctrl
- ImGuiKey_ModShift --> ImGuiMod_Shift
- ImGuiKey_ModAlt --> ImGuiMod_Alt
- ImGuiKey_ModSuper --> ImGuiMod_Super
- IO: commented out legacy io.ClearInputCharacters() obsoleted in 1.89.8 (Aug 2023).
Using io.ClearInputKeys() is enough.
- BeginChild: commented out legacy names which were obsoleted in 1.90.0 (Nov 2023),
1.90.9 (July 2024), 1.91.1 (August 2024). (#462, #7687)
- ImGuiChildFlags_Border --> ImGuiChildFlags_Borders
- ImGuiWindowFlags_NavFlattened --> ImGuiChildFlags_NavFlattened (moved to ImGuiChildFlags).
- ImGuiWindowFlags_AlwaysUseWindowPadding --> ImGuiChildFlags_AlwaysUseWindowPadding (moved to ImGuiChildFlags).
So:
- BeginChild(name, size, 0, ImGuiWindowFlags_NavFlattened) --> BeginChild(name, size, ImGuiChildFlags_NavFlattened, 0)
- BeginChild(name, size, 0, ImGuiWindowFlags_AlwaysUseWindowPadding) --> BeginChild(name, size, ImGuiChildFlags_AlwaysUseWindowPadding, 0)
- Commented out legacy SetItemAllowOverlap() obsoleted in 1.89.7: this never worked right.
Use SetNextItemAllowOverlap() _before_ item instead.
Other Changes:
- Windows:
- Config flag io.ConfigWindowsMoveFromTitleBarOnly is now latched during
Begin(), effectively allowing to change the value on a per-window basis.
(although there is a better internal mechanism for it).
- Fixed single-axis auto-sizing (via double-clicking a border or passing
0.0f on one axis of SetNextWindowSize() call) to take account of remaining
scrollbar on the other axis. (#9060)
- Fixed an issue where repeated calls to SetNextWindowSize() using 0.0f
to auto-size on a given axis would keep marking ini settings as dirty.
- Tables:
- Fixed a bug where nesting BeginTable()->Begin()->BeginTable() would
result in temporarily incorrect state, which would lead to bugs to side effects
in various locations, e.g. GetContentRegionAvail() calls or using clipper. (#9005)
EndTable() was mistakenly restoring a wrong current table.
- Angled headers: fixed an auto-resize feedback loop that could
affect tables with empty non-resizing columns using angled headers, making
them typically flicker back and forth between +0 and +1 pixels.
- Disabled: fixed a bug when a previously enabled item that got nav focus
and then turns disabled could still be activated using keyboard. (#9036)
- InputText:
- When buffer is not resizable, trying to paste contents that cannot
fit will now truncate text to nearest UTF-8 codepoint boundaries,
instead of completely ignoring the paste. (#9029)
- Avoid continuously overwriting ownership of ImGuiKey_Enter/_KeypadEnter
keys in order to allow e.g. external Shortcut override behavior. (#9004)
- When using a callback to reduce/manipulate the value of BufTextLen,
we do not require anymore that CursorPos be clamped by user code. (#9029)
- Fixed an assert when using ImGuiInputTextFlags_ReadOnly and making
underlying contents shorter while text is selected. (#9069, #3237)
(regression from 1.92.3)
- InputTextMultiline: fixed a crash when using ImGuiInputTextFlags_WordWrap and
resizing the parent window while keeping the multi-line field active (which is
most typically achieved when resizing programmatically or via a docking layout
reacting to a platform window resize). (#3237, #9007) [@anton-kl, @ocornut]
- Nav:
- Reworked PageUp/PageDown logic to pick same-page top/bottom page based
on inner rectangle rather than clipping rectangle, ensuring consistent
(but occasionally less practical) navigation result when a window is
partially out of screen. (#787)
- Improved/clarified behavior when requesting PageUp/PageDown from a
focused item which is outside of visible boundaries: now ends up one
page away from focused item. (#9079)
- Clipper: fixed an issue when using up/down from an item outside of
visible bound and using the clipper. (#9079)
- Fonts:
- Calling ImFontAtlas::Clear() mid-frame without re-adding a font will
lead to a more explicit crash.
- Textures:
- Fixed an issue preventing multi-contexts from using each others' fonts
if context 2 runs after context 1's Render() function. (#9039)
- MultiSelect: added ImGuiMultiSelectFlags_NoSelectOnRightClick to disable default
right-click processing, which selects item on mouse down and is designed for
context-menus. (#8200, #9015)
- Groups: fixed an issue reporting IsItemEdited() signal after EndGroup() when
triggered by some widgets e.g. Checkbox(), Selectable() and many others, which
cleared ActiveId at the same time as editing. (#9028)
Note that IsItemDeactivatedAfterEdit() was not affected, only IsItemEdited().
- Misc: standardized casing of keyboard mods in comments and demo, showing
as e.g. "Ctrl" instead of "CTRL".
- CI: Added Dear ImGui Test Suite to CI builds. [@rokups]
- Drag and Drop:
- Added ImGuiDragDropFlags_AcceptDrawAsHovered to make accepting item render
as hovered, which can allow using e.g. Button() as drop target. (#8632)
- Pressing Escape while carrying a payload automatically cancel the
active drag and drop. (#9071)
- Style: added ImGuiCol_DragDropTargetBg, style.DragDropTargetRounding,
style.DragDropTargetBorderSize and style.DragDropTargetPadding to configure
the drop target highlight. (#9056) [@aaronkirkham]
- Demo: About Box: emit infos to convey when IM_ASSERT() macro is disabled,
- so users don't miss out on programming errors being reported.
- so it is included in config/build info submitted in new GitHub Issues.
- Debug Tools:
- Fixed DebugTextEncoding() potentially reading out of bounds when
provided a trailing truncated UTF-8 sequence.
- Metrics: fixed table and columns rect highlight from display when
debug/metrics window is not in the same viewport as the table.
- Backends:
- NULL: added imgui_impl_null platform/renderer backend.
This is designed if you need to run e.g. context with no input or no output.
- GLFW: fixed building on Linux platforms where Wayland headers
are not available. (#9024, #8969, #8921, #8920) [@jagot]
- GLFW: lower minimum requirement from GLFW 3.1 to GLFW 3.0. Though
a recent version e.g GLFW 3.4 is highly recommended! (#9055) [@Clownacy]
- GLFW: fixed last `ImGui_ImplGlfw_Shutdown()` not immediately clearing the context
map, which would be detected by leak trackers. (#9075, #8676, #8239, #8069) [@erincatto]
- SDL3: fixed Platform_OpenInShellFn() return value (the return value
was unused in core but might be used by a direct caller). (#9027) [@achabense]
- SDL3: fixed an issue with missing characters events when an already active text
field changes viewports. (#9054)
- Vulkan: added IMGUI_IMPL_VULKAN_VOLK_FILENAME to configure path to
Volk (default to "volk.h"). (#9008, #7722, #6582, #4854) [@mwlasiuk]
- WebGPU: update to compile with Dawn and Emscripten's 4.0.10+
'--use-port=emdawnwebgpu' ports. (#8381, #8898, #7435) [@brutpitt, @trbabb]
When using Emscripten 4.0.10+, backend now defaults to IMGUI_IMPL_WEBGPU_BACKEND_DAWN
instead of IMGUI_IMPL_WEBGPU_BACKEND_WGPU, if neither are specified.
- WebGPU: added various internal/optional helpers to wrap some of the
Dawn/WGPU/Emscripten debacle quirks: (#8381) [@brutpitt]
- ImGui_ImplWGPU_CreateWGPUSurfaceHelper().
- ImGui_ImplWGPU_IsSurfaceStatusError(), ImGui_ImplWGPU_IsSurfaceStatusSubOptimal().
- ImGui_ImplWGPU_DebugPrintAdapterInfo(),
- ImGui_ImplWGPU_GetBackendTypeName(), ImGui_ImplWGPU_GetAdapterTypeName(),
ImGui_ImplWGPU_GetDeviceLostReasonName(), ImGui_ImplWGPU_GetErrorTypeName(),
ImGui_ImplWGPU_GetLogLevelName().
- Win32: Revert 1.92.4 change of comparing dwPacketNumber, which prevents
refreshing accurate gamepad info after focus-out + io.ClearInputKeys(). (#8556)
- Examples:
- NULL: update examples_null to use imgui_impl_null (which is a bit overengineering
but somehow consistent).
- GLFW+WebGPU: update example for latest specs, to work on Emscripten 4.0.10+,
latest Dawn-Native and WGPU-Native. (#8381, #8567, #8191, #7435) [@brutpitt]
- GLFW+WebGPU: removed unnecessary ImGui_ImplWGPU_InvalidateDeviceObjects() call
during surface resize. (#8381)
- SDL2+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt]
- SDL3+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt]
- Win32+OpenGL3: enable DPI awareness. (#9083)
Docking+Viewports Branch:
- Docking, Style: fixed per-window ImGuiCol_UnsavedMarker changes not being latched
by docked windows. (#8983, #9064)
- Docking: fixed crash loading certain form of invalid .ini settings (e.g. nodes
referring to a missing parent, duplicate nodes id). (#9070)
- Docking: added io.ConfigDockingNoDockingOver helper config flag to prevent
merging windows into a same tab-bar.
- Examples:
- SDL2+DX11, SDL3+DX11, Win32+DX10, Win32+DX11: fixed one resource leak
from the use of MakeWindowAssociation() in 1.92.4. (#9010, #4350) [@o-3-o]
- Backends:
- DirectX12: Fixed an issue in synchronization logic improving rendering
throughput for secondary viewports. (#9025, #8961)
- Vulkan: handle viewport surface creation failure without crashing. (#9068) [@zentia]
-----------------------------------------------------------------------
VERSION 1.92.4 (Released 2025-10-14)
-----------------------------------------------------------------------
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.4
Breaking Changes:
- Viewports: for consistency with other config flags, renamed
io.ConfigViewportPlatformFocusSetsImGuiFocus
to io.ConfigViewportsPlatformFocusSetsImGuiFocus. (#6299, #6462)
It was really a typo in the first place, and introduced in 1.92.2.
- Backends:
- TreeNode, Selectable, Clipper: commented out legacy names obsoleted in
1.89.7 (July 2023) and 1.89.9 (Sept 2023):
ImGuiTreeNodeFlags_AllowItemOverlap --> ImGuiTreeNodeFlags_AllowOverlap
ImGuiSelectableFlags_AllowItemOverlap --> ImGuiSelectableFlags_AllowOverlap
ImGuiListClipper::IncludeRangeByIndices() --> ImGuiListClipper::IncludeItemsByIndex()
- Vulkan: moved some fields in ImGui_ImplVulkan_InitInfo:
init_info.RenderPass --> init_info.PipelineInfoMain.RenderPass
init_info.Subpass --> init_info.PipelineInfoMain.Subpass
init_info.MSAASamples --> init_info.PipelineInfoMain.MSAASamples
init_info.PipelineRenderingCreateInfo --> init_info.PipelineInfoMain.PipelineRenderingCreateInfo
It makes things more consistent and was desirable to introduce new settings for
secondary viewports. (#8946, #8110, #8111, #8686) [@ocornut, @SuperRonan, @sylmroz]
- Vulkan: renamed ImGui_ImplVulkan_MainPipelineCreateInfo --> ImGui_ImplVulkan_PipelineInfo
(introduced very recently and only used by `ImGui_ImplVulkan_CreateMainPipeline()`
so it should not affect many users). (#8110, #8111)
- Vulkan: helper ImGui_ImplVulkanH_CreateOrResizeWindow() added a
`VkImageUsageFlags image_usage` argument.
It was previously hardcoded to `VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT` and defaults
to that when the value is 0. In theory the function is an internal helper but
since it's used by our examples some may have used it. (#8946, #8111, #8686)
Other Changes:
- Windows: added lower-right resize grip on child windows using both
ImGuiChildFlags_ResizeX and ImGuiChildFlags_ResizeY flags. (#8501) [@aleksijuvani]
The grip is not visible before hovering to reduce clutter.
- Style: added ImGuiCol_UnsavedMarker, color of the unsaved document marker when
using ImGuiWindowFlags_UnsavedDocument/ImGuiTabItemFlags_UnsavedDocument. (#8983)
- IO: added ImGuiPlatformIO::ClearPlatformHandlers(), ClearRendererHandlers()
helpers to null all handlers. (#8945, #2769)
- Tables: changed ImGuiTableFlags_NoBordersInBody behavior to not draw border in
body even when resizing. (#8893)
- Inputs:
- Shortcuts: added support for combining ImGuiInputFlags_RouteFocused
(which is the default route) with ImGuiInputFlags_RouteOverActive, allowing
to steal shortcuts from active item without using global routing. (#9004)
- InputText:
- Fixed single-line InputText() not applying fine character clipping
properly (regression in 1.92.3). (#8967) [@Cyphall]
- Fixed an infinite loop error happening if a custom input text
callback modifies/clear BufTextLen before calling InsertChars().
(regression from 1.92.3). Note that this never really worked correctly, but
previously it would only temporary wreck cursor position, and since 1.92.3 it
would go in an infinite loop. (#8994, #3237)
- Textures:
- Fixed a crash if texture status is set to ImTextureStatus_WantDestroy by a backend
after it had already been destroyed. This would typically happen when calling
ImGui_ImplXXXX_InvalidateDeviceObjects() helpers twice in a row. (#8977, #8811)
- Allowed backend to destroy texture while inside the NewFrame/EndFrame
scope. Basically if a backend decide to destroy a texture that we didn't request
to destroy (for e.g. freeing resources) the texture is immediately set to
a ImTextureStatus_WantCreate status again. (#8811)
- Fixed an issue preventing multi-contexts sharing a ImFontAtlas from
being possible to destroy in any order.
- Fixed not updating ImTextureData's RefCount when destroying a context
using a shared ImFontAtlas, leading standard backends to not properly
free texture resources. (#8975) [@icrashstuff]
- Demo: fixed layout issue in "Layout & Scrolling -> Scrolling" section.
- Misc: Relaxed internal assert in MarkItemEdited() to allow for more use cases. (#8997)
- Misc: Debuggers: added type formatters for the LLDB debuggers (e.g. Xcode,
Android Studio & more) to provide nicer display for ImVec2, ImVec4, ImVector etc.
See misc/debuggers/ for details. (#8950) [@mentlerd]
- CI: updated Windows CI scripts to generate/use VulkanSDK. (#8925, #8778) [@yaz0r]
- Docs: updated FAQ with new "What is the difference between Dear ImGui and
traditional UI toolkits?" entry. (#8862)
- Backends:
- All backends call ImGuiPlatformIO::ClearPlatformHandlers() and
ClearRendererHandlers() on shutdown, so as not to leave function pointers
which may be dangling when using backend in e.g. DLL. (#8945, #2769)
- DirectX12: reuse a command list and allocator for texture uploads instead
of recreating them each time. (#8963, #8465) [@RT2Code]
- DirectX12: Rework synchronization logic. (#8961) [@RT2Code]
(presumably fixes old hard-to-repro crash issues such as #3463, #5018)
- DirectX12: Reuse texture upload buffer and grow it only when
necessary. (#9002) [@RT2Code]
- DirectX12: Enable swapchain tearing if available. (#8965) [@RT2Code]
- OpenGL3: fixed GL loader to work on Haiku OS which does not support
`RTLD_NOLOAD`. (#8952) [@Xottab-DUTY, @threedeyes]
- GLFW: fixed build on platform that are neither Windows, macOS or
known Unixes (Regression in 1.92.3). (#8969, #8920, #8921) [@oktonion]
- SDL2,SDL3: avoid using the SDL_GetGlobalMouseState() path when one of our
window is hovered, as the event data is reliable and enough in this case.
- Fix mouse coordinates issue in fullscreen apps with macOS notch. (#7919, #7786)
- Essentially a workaround for SDL3 bug which will be fixed in SDL 3.3.0.
- Better perf on X11 as querying global position requires a round trip to X11 server.
- Win32: minor optimization not submitting gamepad io again if
XInput's dwPacketNumber has not changed. (#8556) [@MidTerm-CN]
- Vulkan: added a way to specify custom shaders by filling init fields
CustomShaderVertCreateInfo and CustomShaderFragCreateInfo. (#8585, #8271) [@johan0A]
- DX9,DX10,DX11,DX12,Metal,Vulkan,WGPU,SDLRenderer2,SDLRenderer3:
ensure that a texture in ImTextureStatus_WantDestroy state always turn to
ImTextureStatus_Destroyed even if your underlying graphics data was already
destroyed. (#8977)
- Examples:
- SDL2+DirectX11: Try WARP software driver if hardware driver is
not available. (#5924, #5562)
- SDL3+DirectX11: Added SDL3+DirectX11 example. (#8956, #8957) [@tomaz82]
- Win32+DirectX12: Rework synchronization logic. (#8961) [@RT2Code]
- Made examples's main.cpp consistent with returning 1 on error.
Docking+Viewports Branch:
- Nav, Docking, Selection: Fixed tab change from reinitializing navigation state,
which would erroneously clear selection when using ImGuiSelectableFlags_SelectOnNav
or clear multi-selection when not using ImGuiMultiSelectFlags_NoAutoSelect. (#8997)
- Nav: Fixed a crash that could occur when opening a popup following the processing
of a global shortcut while no windows were focused (the fix done in 1.92.3 was
incomplete for docking branch).
- Viewports:
- Added ImGuiBackendFlags_HasParentViewport backend flag for
backend to specify if it can honor the `viewport->ParentViewport`/`ParentViewportId`
value by applying the corresponding parent/child relation at the Platform level. (#8948)
- SDL3, Win32 backends: supported.
- SDL2, GLFW, OSX backends: unsupported.
- Fixed a bug where ImGuiWindowFlags_NoBringToFrontOnFocus would effectively
be ignored when windows first appear and viewports are enabled. (#7008) [@jshofmann]
- Changed default value of io.ConfigViewportsNoDefaultParent to true. (#8948)
- Fixed an issue inferring Z-order when attempting to merge a viewport
back in the the main/hosting viewport. (#8948)
Note that for GLFW/SDL2/OSX backends, which do not support honoring ParentViewportID.
Setting io.ConfigViewportsNoDefaultParent=true will align imgui's expectation
with what the backend does.
- Storing `ImGuiViewport* ParentViewport` pointer along with ParentViewportID.
- ImGui::DestroyContext() does not call DestroyPlatformWindows() anymore at it
is assumed to be unnecessary as backends should have done it and we check that
backends have been shutdown since 1.90.4. Changed into asserts. (#7175, #8945)
- Backends:
- DirectX10, DirectX11, DirectX12: Disabled DXGI's Alt+Enter default behavior on
secondary viewports managed by the backend. (#4350) [@PathogenDavid]
- DirectX10, DirectX11: avoid ImGui_ImplXXXX_SwapBuffers() handlers for secondary
viewports crashing if SwapChain could not be created.
- Vulkan: Added a way to configure secondary viewport pipeline creation by
setting init_info.PipelineInfoForViewports fields. (#8946, #8110, #8111, #8686)
- Vulkan: Added a way to configure secondary viewport swapchain VkImageUsageFlags
to e.g. capture rendering. (#8946, #8940) [@olivier-gerard, @ocornut]
Usage example: `init_info.PipelineInfoForViewports.SwapChainImageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;`
- Vulkan: pipeline created for secondary viewport automatically match
surface format. (#8686) [@sylmroz]
- Vulkan: Added ImGui_ImplVulkanH_GetWindowDataFromViewport() accessor/helper. (#8946, #8940) [@olivier-gerard]
- Docs: improve docking API comments and demo. (#9000)
- Examples: DX10, DX11: Disabled DXGI's Alt+Enter default behavior in examples.
Applications are free to leave this enabled, but it does not work properly with
multiple viewports. (#4350, #8979) [@PathogenDavid]
-----------------------------------------------------------------------
VERSION 1.92.3 (Released 2025-09-17)
-----------------------------------------------------------------------
Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.92.3
Other Changes:
- Fonts: fixed merging a font and specifying a font target in DstFont
that's not the last added font (regression in 1.92). (#8912)
- Fonts: fixed an assertion failure when a rectangle entry has been reused
1024 times (e.g. due to constant change of font size). (#8906) [@cfillion]
- Clipper, Tables: added ImGuiListClipperFlags_NoSetTableRowCounters as a way to
disable the assumption that 1 clipper item == 1 table row, which breaks when
e.g. using clipper with ItemsHeight=1 in order to clip in pixel units. (#8886)
- Scrollbar, Style: added configurable style.ScrollbarPadding value and corresponding
ImGuiStyleVar_ScrollbarPadding enum, instead of an hard-coded computed default. (#8895)
- Nav: fixed Ctrl+Tab window appearing as empty when the sole active and focused
window has the ImGuiWindowFlags_NoNavFocus flag. (#8914)
- Nav: fixed a crash that could occur when opening a popup following the processing
of a global shortcut while no windows were focused.
- Bullet: fixed tessellation which looked out of place in very large sizes.
- InputText: added ImGuiInputTextFlags_WordWrap flag to word-wrap multi-line buffers.
(#3237, #952, #1062, #7363). Current caveats:
- This is marked as beta because not being tested enough.
Please report any incorrect cursor movement, selection behavior etc. bug to #3237.
- Wrapping style is not ideal. Wrapping of long words/sections (e.g. words
larger than total available width) may be particularly unpleasing.
- Wrapping width needs to always account for the possibility of a vertical scrollbar.
- It is currently much slower than regular text fields:
- Ballpark estimate of cost on my 2019 desktop PC:
For a 100 KB text buffer: +~0.3 ms/+~1.0 ms (Optimized vs Debug builds).
- The CPU cost is very roughly proportional to text length, so a 10 KB buffer
should cost about ten times less.
- InputText, InputInt, InputFloat: fixed an issue where using Escape to revert
would not write back the reverted value during the IsItemDeactivatedAfterEdit()
frame if the provided input buffer doesn't store temporary edits.
(regression in 1.91.7) (#8915, #8273)
- InputText: fixed an issue where using Escape with ImGuiInputTextFlags_EscapeClearsAll
would not write back the cleared value during the IsItemDeactivatedAfterEdit()
frame if the provided input buffer doesn't store temporary edits. (#8915, #8273)
- InputText: allow passing an empty string with buf_size==0. (#8907)
In theory the buffer size should always account for a zero-terminator, but idioms
such as using InputTextMultiline() with ImGuiInputTextFlags_ReadOnly to display
a text blob are facilitated by allowing this.
- InputText: refactored internals to simplify and optimizing rendering of selection.
Very large selection (e.g. 1 MB) now take less overhead.
- InputText: revert a change in 1.79 where pressing Down or PageDown on the last line
of a multi-line buffer without a trailing carriage return would keep the cursor
unmoved. We revert back to move to the end of line in this situation.
- InputText: fixed pressing End (without Shift) in a multi-line selection from
mistakenly moving cursor based on selection start.
- Focus, InputText: fixed an issue where SetKeyboardFocusHere() did not work
on InputTextMultiline() fields with ImGuiInputTextFlags_AllowTabInput, since
they normally inhibit activation to allow tabbing through multiple items. (#8928)
- Selectable: added ImGuiSelectableFlags_SelectOnNav to auto-select an item when
moved into, unless Ctrl is held. (automatic when in a BeginMultiSelect() block).
- TabBar: fixed an issue were forcefully selecting a tab using internal API would
be ignored on first/appearing frame before tabs are submitted (#8929, #6681)
- DrawList: fixed CloneOutput() unnecessarily taking a copy of the ImDrawListSharedData
pointer, which could to issue when deleting the cloned list. (#8894, #1860)
- DrawList: made AddCallback() assert when passing a null callback.
- Debug Tools: ID Stack Tool: fixed using fixed-size buffers preventing long identifiers
from being displayed in the tool. (#8905, #4631)
- Debug Tools: ID Stack Tool: when ### is used, uncontributing prefix before the ###
is now skipped. (#8904, #4631)
- Debug Tools: ID Stack Tool: added option to hex-encode non-ASCII characters in
output path. (#8904, #4631)
- Debug Tools: ID Stack Tool: fixed a crash when using PushOverrideID(0) during
a query. (#8937, #4631)
- Debug Tools: Fixed assertion failure when opening a combo box while using
io.ConfigDebugBeginReturnValueOnce/ConfigDebugBeginReturnValueLoop. (#8931) [@harrymander]
- Demo: tweaked ShowFontSelector() and ShowStyleSelector() to update selection
while navigating and to not close popup automatically.
- CI: Updates Windows CI to use a more recent VulkanSDK. (#8925, #8778) [@yaz0r]
- Examples: Android: Android+OpenGL3: update Gradle project (#8888, #8878) [@scribam]
- Examples: GLFW+OpenGL2, GLFW+Vulkan, GLFW+Metal, Win32+Vulkan: Fixed not applying
content scale consistently with other examples. (#8921, #8756)
- Backends: GLFW: distinguish X11 vs Wayland to fix various scaling issues.
(#8920, #8921) [@TheBrokenRail, @pthom, @ocornut]
- window/monitor content scales are always reported as 1.0 on Wayland.
- framebuffer scales are always reported as 1.0 on X11.
- Backends: SDL2: window/monitor content scales are always reported as 1.0 on Wayland.
(#8920, #8921) [@TheBrokenRail, @pthom, @ocornut]
- Backends: SDL3: use SDL_GetWindowDisplayScale() on Mac to obtain DisplayFrameBufferScale,
fixing incorrect values during resolution changes e.g. going fullscreen.
(#8703, #4414) [@jclounge]
- Backends: SDL_GPU: Added ImGui_ImplSDLGPU3_InitInfo::SwapchainComposition and
PresentMode to configure how secondary viewports are created. Currently only used
multi-viewport mode. (#8892) [@PTSVU]
- Backends: Vulkan: added ImGui_ImplVulkan_CreateMainPipeline() to recreate pipeline
without reinitializing backend. (#8110, #8111) [@SuperRonan]
Docking+Viewports Branch:
- DPI: fixed io.ConfigDpiScaleFonts from ever working since 1.92 (the irony
being that it is when it started to make sense!). As a reminder, the option
automatically copy the _current_ viewport DpiScale to style.FontScaleDpi.
This is why we separated the style.FontScaleMain and style.FontScaleDpi scaling
factor, as the later is meant to be overwritten. (#8832, #8465)
- DPI: Fixed obsoleted ImGuiConfigFlags_DpiEnableScaleFonts/_DpiEnableScaleViewports
names from setting the equivalent io.ConfigDpiScaleFonts/io.ConfigDpiScaleViewports
flag correctly (regression in 1.92).
- Docking, Style: added style.DockingNodeHasCloseButton option to hide the
Close Button attached to each docking node. (#8933)
- Backends: GLFW: improve multi-viewport behavior in tiling WMs on X11.
Note: using GLFW backend on Linux/BSD etc. requires linking with `-lX11`.
(#8884, #8474, #8289, #2117) [@Ikos3k, @Madman10K]
-----------------------------------------------------------------------
VERSION 1.92.2b (Released 2025-08-13)
-----------------------------------------------------------------------
@@ -50,11 +752,17 @@ Changes:
leak between items when the window cannot be moved.
- Backends: Allegro5: Fixed texture format setup which didn't work on all
setups/drivers. (#8770, #8465)
- Backends: Allegro5: Added ImGui_ImplAllegro5_SetDisplay() function to
- Backends: Allegro5: Added ImGui_ImplAllegro5_SetDisplay() function to
change current ALLEGRO_DISPLAY, as Allegro applications often need to do that.
- Backends: Allegro5: Fixed missing support for ImGuiKey_PrintScreen
under Windows, as raw Allegro 5 does not receive it.
Docking+Viewports Branch:
- Fixed a bug where closing a viewport using OS facility (e.g. ALT+F4, Close Button)
would erroneously close all windows located in the viewport, even ones docked
into nested dockspaces. Only top-most windows should be closed. (#8887) [@lailoken]
-----------------------------------------------------------------------
VERSION 1.92.2 (Released 2025-08-11)
@@ -291,7 +999,7 @@ Breaking changes:
which font input is providing which glyph.
- Fonts: **IMPORTANT** on Thread Safety:
- A few functions such as font->CalcTextSizeA() were by sheer luck (== accidentally)
thread-safe even thou we had never provided that guarantee before. They are
thread-safe even though we had never provided that guarantee before. They are
definitively not thread-safe anymore as new glyphs may be loaded.
- Textures:
@@ -329,7 +1037,7 @@ Breaking changes:
to 4096 but that limit isn't necessary anymore, and Renderer_TextureMaxWidth covers this)
However you may set TexMinWidth = TexMaxWidth for the same effect.
- Fonts: if you create and manage ImFontAtlas instances yourself (instead of relying on
ImGuiContext to create one, you'll need to call ImFontAtlasUpdateNewFrame() yourself.
ImGuiContext to create one), you'll need to call ImFontAtlasUpdateNewFrame() yourself.
An assert will trigger if you don't.
- Fonts: obsoleted ImGui::SetWindowFontScale() which is not useful anymore. Prefer using
PushFont(NULL, style.FontSizeBase * factor) or to manipulate other scaling factors.
@@ -680,8 +1388,8 @@ Docking+Viewports Branch:
- Viewports: fixed handling of simultaneous move + resize (e.g. toggling maximized)
when ImGuiConfigFlags_DpiEnableScaleViewports is enabled.
- Backends: Win32: Viewports: fixed an issue when closing a window from
the OS close button (with io.ConfigViewportsNoDecoration=false) while
user code is discarding the 'bool *p_open=false output' from Begin().
the OS close button (with io.ConfigViewportsNoDecoration=false) while
user code is discarding the 'bool *p_open=false output' from Begin().
Because we allowed the Win32 window to close early, Windows destroyed
it and our imgui window became not visible even though user code was
still submitting it. (#8670)
@@ -832,7 +1540,7 @@ Other changes:
with asserts enabled. (#8452)
- Backends: SDL2, SDL3: Using SDL_OpenURL() in platform_io.Platform_OpenInShellFn
handler. (#7660) [@achabense]
- Backends: SDL2, SDL3: Use display bounds when SDL_GetDisplayUsableBounds()
- Backends: SDL2, SDL3: Use display bounds when SDL_GetDisplayUsableBounds()
fails or return a zero size. (#8415, #3457)
- Backends: SDL2, SDL3, Win32, Allegro5: Added support for ImGuiMouseCursor_Wait
and ImGuiMouseCursor_Progress cursors.
@@ -860,9 +1568,9 @@ Docking+Viewports Branch:
- Docking: Removed legacy assert preventing to call DockBuilderSplitNode() on an existing
split node. This makes using DockBuilder a little more flexible and bearable! (#8472) [@MegaMech]
- Viewports: fixed an issue where in certain cases, a window repositioning leading
to a monitor change could have the window incorrectly get clamped within the boundaries
of its previous monitor. Would happen e.g. when loading .ini data during runtime. (#8484)
- Viewports: fixed an issue where in certain cases, a window repositioning leading
to a monitor change could have the window incorrectly get clamped within the boundaries
of its previous monitor. Would happen e.g. when loading .ini data during runtime. (#8484)
- Viewports: fixed an assert when a window load settings with a position outside
monitor bounds, when there are multiple monitors. (#8393, #8385) [@gaborodriguez]
- Viewports + Backends: Win32: Fixed setting title bar text when application
@@ -1111,6 +1819,7 @@ Breaking changes:
- Commented out pre-1.87 IO system (equivalent to using IMGUI_DISABLE_OBSOLETE_KEYIO or IMGUI_DISABLE_OBSOLETE_FUNCTIONS before).
- io.KeyMap[] and io.KeysDown[] are removed (obsoleted February 2022). Use IsKeyDown() instead.
- io.NavInputs[] and ImGuiNavInput are removed (obsoleted July 2022).
- GetKeyIndex() is removed (obsoleted March 2022). The indirection is now unnecessary.
- Pre-1.87 backends are not supported:
- backends need to call io.AddKeyEvent(), io.AddMouseEvent() instead of writing to io.KeysDown[], io.MouseDown[] fields.
- backends need to call io.AddKeyAnalogEvent() for gamepad values instead of writing to io.NavInputs[] fields.
@@ -1187,7 +1896,7 @@ Breaking changes:
allows casting any pointer/integer type without warning:
- May warn: ImGui::Image((void*)MyTextureData, ...);
- May warn: ImGui::Image((void*)(intptr_t)MyTextureData, ...);
- Won't warn: ImGui::Image((ImTextureID)(intptr_t)MyTextureData), ...);
- Won't warn: ImGui::Image((ImTextureID)(intptr_t)MyTextureData, ...);
- Note that you can always define ImTextureID to be your own high-level structures
(with dedicated constructors and extra render parameters) if you like.
- IO: moved ImGuiConfigFlags_NavEnableSetMousePos to standalone io.ConfigNavMoveSetMousePos bool.
@@ -4997,7 +5706,7 @@ Breaking Changes:
- ShowTestWindow() -> use ShowDemoWindow()
- IsRootWindowFocused() -> use IsWindowFocused(ImGuiFocusedFlags_RootWindow)
- IsRootWindowOrAnyChildFocused() -> use IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows)
- SetNextWindowContentWidth(w) -> use SetNextWindowContentSize(ImVec2(w, 0.0f)
- SetNextWindowContentWidth(w) -> use SetNextWindowContentSize(ImVec2(w, 0.0f))
- GetItemsLineHeightWithSpacing() -> use GetFrameHeightWithSpacing()
- ImGuiCol_ChildWindowBg -> use ImGuiCol_ChildBg
- ImGuiStyleVar_ChildWindowRounding -> use ImGuiStyleVar_ChildRounding
+19 -3
View File
@@ -72,7 +72,7 @@ OSX + OpenGL2 example. <BR>
You may prefer to use the GLFW Or SDL backends, which will also support Windows and Linux.)
[example_glfw_wgpu/](https://github.com/ocornut/imgui/blob/master/examples/example_glfw_wgpu/) <BR>
GLFW + WebGPU example. Supports Emscripten (web) or Dawn (desktop) <BR>
GLFW + WebGPU example. Supports Emscripten (web), Dawn (native), WGPU (native). <BR>
= main.cpp + imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp
Note that the 'example_glfw_opengl3' and 'example_sdl2_opengl3' examples also supports Emscripten!
@@ -109,9 +109,11 @@ Note that GLUT/FreeGLUT is largely obsolete software, prefer using GLFW or SDL.
[example_null/](https://github.com/ocornut/imgui/blob/master/examples/example_null/) <BR>
Null example, compile and link imgui, create context, run headless with no inputs and no graphics output. <BR>
= main.cpp <BR>
= main.cpp + imgui_impl_null.cpp<BR>
This is used to quickly test compilation of core imgui files in as many setups as possible.
Because this application doesn't create a window nor a graphic context, there's no graphics output.
Please note that imgui_impl_null itself is a rather empty backend. We provide it for consistency but
it is similarly easy to create a skeleton application without the null backend.
[example_sdl2_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_directx11/) <BR>
SDL2 + DirectX11 example, Windows only. <BR>
@@ -149,8 +151,17 @@ SDL2 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>
This is quite long and tedious, because: Vulkan. <BR>
For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
[example_sdl2_wgpu/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_wgpu/) <BR>
SDL2 + WebGPU example. Supports Emscripten (web), Dawn (native), WGPU (native). <BR>
= main.cpp + imgui_impl_sdl2.cpp + imgui_impl_wgpu.cpp
(note that the 'example_sdl2_opengl3' example also supports Emscripten!)
[example_sdl3_directx11/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_directx11/) <BR>
SDL3 + DirectX11 examples, Windows only. <BR>
= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_dx11.cpp <BR>
[example_sdl3_metal/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_metal/) <BR>
SDL3 + Metal example (Mac). <BR>
SDL3 + Metal example, Mac only. <BR>
= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_metal.mm <BR>
[example_sdl3_opengl3/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_opengl3/) <BR>
@@ -173,6 +184,11 @@ SDL3 (Win32, Mac, Linux, etc.) + Vulkan example. <BR>
This is quite long and tedious, because: Vulkan. <BR>
For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
[example_sdl3_wgpu/](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_wgpu/) <BR>
SDL3 + WebGPU example. Supports Emscripten (web), Dawn (native), WGPU (native). <BR>
= main.cpp + imgui_impl_sdl3.cpp + imgui_impl_wgpu.cpp
(note that the 'example_sdl3_opengl3' example also supports Emscripten!)
[example_win32_directx9/](https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx9/) <BR>
DirectX9 example, Windows only. <BR>
= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx9.cpp
+69 -8
View File
@@ -13,13 +13,14 @@ or view this file with any Markdown viewer.
:---------------------------------------------------------- |
| [Where is the documentation?](#q-where-is-the-documentation) |
| [What is this library called?](#q-what-is-this-library-called) |
| [What is the difference between Dear ImGui and traditional UI toolkits?](#q-what-is-the-difference-between-dear-imgui-and-traditional-ui-toolkits) |
| [Which version should I get?](#q-which-version-should-i-get) |
| **Q&A: Integration** |
| **[How to get started?](#q-how-to-get-started)** |
| **[How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?](#q-how-can-i-tell-whether-to-dispatch-mousekeyboard-to-dear-imgui-or-my-application)** |
| [How can I enable keyboard or gamepad controls?](#q-how-can-i-enable-keyboard-or-gamepad-controls) |
| [How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)](#q-how-can-i-use-this-on-a-machine-without-mouse-keyboard-or-screen-input-share-remote-display) |
| [How can I create my own backend?](q-how-can-i-create-my-own-backend)
| [How can I create my own backend?](#q-how-can-i-create-my-own-backend)
| [I integrated Dear ImGui in my engine and little squares are showing instead of text...](#q-i-integrated-dear-imgui-in-my-engine-and-little-squares-are-showing-instead-of-text) |
| [I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-clipping-or-disappearing-when-i-move-windows-around) |
| [I integrated Dear ImGui in my engine and some elements are displaying outside their expected windows boundaries...](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-displaying-outside-their-expected-windows-boundaries) |
@@ -75,6 +76,60 @@ or view this file with any Markdown viewer.
---
### Q: What is the difference between Dear ImGui and traditional UI toolkits?
Here's a very simplified comparison between the approach taken by Dear ImGui vs traditional toolkits:
| Dear ImGui | Qt/GTK/WPF... |
|--------------------------|--------------------------|
| UI fully issued on every update. | UI issued once then later modified. |
| UI layout is fully dynamic and can change at any time.<BR>UI is generally emitted programmatically, which empowers reflecting a dynamic set of data. | UI layout is mostly static.<BR>UI may be emitted programmatically or from data created by offline tools. UI need extra code to evolve, which is often tedious and error-prone if it needs to be reflecting dynamic data and systems. |
| Application can submit UI based on arbitrary logic and then forget about it. | Application needs more bookkeeping of UI elements. |
| UI library stores minimal amounts of data. At one point in time, it typically doesn't know or remember which other widgets are displayed and which widgets are coming next. As a result, certain layout features (alignment, resizing) are not as easy to implement or require ad-hoc code. | UI library stores entire widgets tree and state. UI library can use this retained data to easily layout things. |
| UI code may be added anywhere.<BR>You can even create UI to edit a local variable! | UI code needs to be added in dedicated spots. |
| UI layout/logic/action/data bindings are all nearby in the code. | UI layout/logic/action/data bindings in distinct functions, files or formats. |
| Data is naturally always synchronized. | Use callback/signal/slot for synchronizing data (error-prone). |
| API is simple and easy to learn. In particular, doing basic things is very easy. | API is more complex and specialized. |
| API is low-level (raw language types). | API are higher-level (more abstractions, advanced language features). |
| Less fancy look and feel. | Standard look and feel. |
| Compile yourself. Easy to debug, hack, modify, study. | Mostly use precompiled libraries. Compiling, modifying or studying is daunting if not impossible. |
| Run on every platform. | Run on limited desktop platforms. |
Idiomatic Dear ImGui code:
```cpp
if (ImGui::Button("Save"))
MySaveFunction();
ImGui::SliderFloat("Slider", &m_MyValue, 0.0f, 1.0f);
```
Idiomatic code with traditional toolkit:
```cpp
UiButton* button = new UiButton("Save");
button->OnClick = &MySaveFunction;
parent->Add(button);
UiSlider* slider = new UiSlider("Slider");
slider->SetRange(0.0f, 1.0f);
slider->BindData<float>(&m_MyValue);
parent->Add(slider);
```
This is only meant to give you a intuitive feeling of the main differences, but pros & cons go deeper than that.
Some of those properties are typically associated to the umbrella term "IMGUI", but the term has no simple and well-agreed definition. There are many erroneous statements and misunderstandings with what IMGUI means. It is partly caused by the fact that most popular IMGUI implementations (including Dear ImGui) have originated from game industry needs and have targeted specific use cases, causing people to conflate IMGUI properties with what a specific library does. However, it is perfectly possible to implement an IMGUI library that would have very different properties than e.g. Dear ImGui. My take on defining what an IMGUI is:
**IMGUI refers to the API: literally the interface between the application and the UI system.**
- An IMGUI API favors the application code owning its data and being the single source of truth for it.
- An IMGUI API tries to minimize the application having to retain/manage data related to the UI system.
- An IMGUI API tries to minimize the UI system having to retain/manage data related to the application.
- Synchronization between application data and UI data is natural and less error-prone.
**IMGUI does NOT refer to the implementation. Whatever happens inside the UI library code doesn't matter.**
<BR>Also see: [Links to many articles about the IMGUI paradigm](https://github.com/ocornut/imgui/wiki/#about-the-imgui-paradigm).
##### [Return to Index](#index)
---
### Q: Which version should I get?
I occasionally tag [Releases](https://github.com/ocornut/imgui/releases) but it is generally safe and recommended to sync to master/latest. The library is fairly stable and regressions tend to be fixed fast when reported.
@@ -603,22 +658,28 @@ Since 1.92 (June 2025) fonts may be dynamically used at any size.
**Scaling fonts**
Select default size:
```cpp
style.FontSizeBase = 20.0f;
```
Scale all fonts:
```cpp
style.FontScaleDpi = 2.0f;
```
To change font size:
```cpp
ImGui::PushFont(NULL, 42.0f);
ImGui::PushFont(NULL, 42.0f); // This will be multiplied by style.FontScaleDpi
```
To change font and font size:
```cpp
ImGui::PushFont(new_font, 42.0f);
```
To scale all fonts:
```cpp
style.FontScaleDpi = 2.0f;
```
In `docking` branch or with multi-viewports:
```cpp
io.ConfigDpiScaleFonts = true; // [Experimental] Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now.
io.ConfigDpiScaleViewports = true; // [Experimental] Scale Dear ImGui and Platform Windows when Monitor DPI changes.
io.ConfigDpiScaleFonts = true; // (Docking branch only) Automatically overwrite style.FontScaleDpi in Begin() when Monitor DPI changes. This will scale fonts but _NOT_ scale sizes/padding for now.
io.ConfigDpiScaleViewports = true; // (Docking branch only) Scale Dear ImGui and Platform Windows when Monitor DPI changes.
```
**Scaling style** (paddings, spacings, thicknesses)
+58 -25
View File
@@ -2,10 +2,20 @@ _(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/FONTS
## Dear ImGui: Using Fonts
The code in imgui.cpp embeds a copy of [ProggyClean.ttf](http://proggyfonts.net) (by Tristan Grimmer),
a 13 pixels high, pixel-perfect font used by default. We embed it in the source code so you can use Dear ImGui without any file system access. ProggyClean does not scale smoothly, therefore it is recommended that you load your own file when using Dear ImGui in an application aiming to look nice and wanting to support multiple resolutions.
The code in Dear ImGui embeds a copy of [ProggyClean.ttf](https://github.com/bluescan/proggyfonts) by Tristan Grimmer,
a 13 pixels high, pixel-perfect font used by default. ProggyClean does not scale very nicely.
You may also load external .TTF/.OTF files.
The code in Dear ImGui embeds a partial copy of [ProggyForever.ttf](https://github.com/ocornut/proggyforever) by Disco Hello & Tristan Grimmer,
a new font mimicking ProggyClean which does scale nicely.
We embed fonts in the code so you can use Dear ImGui without any file system access.
If you don't use them you can set `IMGUI_DISABLE_DEFAULT_FONT` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file to ship binaries without the fonts and save about ~26 KB.
Calling io.Fonts->AddFontDefaultVector() loads ProggyForever.
Calling io.Fonts->AddFontDefaultBitmap() loads ProggyClean.
Calling io.Fonts->AddFontDefault() selects one based on the expected default font size (when `style.FontSizeBase * style.FontScaleMain * style.FontSizeDpi >= 15` we use ProggyForever).
You may also load external .TTF/.OTF files, see instructions on this page.
In the [misc/fonts/](https://github.com/ocornut/imgui/tree/master/misc/fonts) folder you can find a few suggested fonts, provided as a convenience.
**Also read the FAQ:** https://www.dearimgui.com/faq (there is a Fonts section!)
@@ -89,7 +99,10 @@ See [#8465](https://github.com/ocornut/imgui/issues/8465) for more details.
## How should I handle DPI in my application?
See [FAQ entry](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-should-i-handle-dpi-in-my-application).
Since 1.92, with an updated backend, you can set `style.FontScaleDpi = your_content_scale;` to scale all fonts.
<BR>You can call `style.ScaleAllSizes(xxx)` at init time or every frame at the beginning of your main loop to scale sizes/paddings.
<BR>Since 1.92, with an updated backend, macOS style pixel/backing style scale is automatically handled.
<BR>See [FAQ entry](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-should-i-handle-dpi-in-my-application) for more details.
##### [Return to Index](#index)
@@ -97,10 +110,22 @@ See [FAQ entry](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-s
## Fonts Loading Instructions
**Select base size**
```cpp
ImGuiStyle& style = ImGui::GetStyle();
style.FontSizeBase = 20.0f;
```
**Load default font:**
```cpp
ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontDefault();
io.Fonts->AddFontDefaultVector(); // Load embedded scalable font.
```
```cpp
io.Fonts->AddFontDefaultBitmap(); // Load embedded bitmap font (legacy).
```
```cpp
io.Fonts->AddFontDefault(); // Load embedded font (legacy: auto-selected between the two above).
```
**Load .TTF/.OTF file with:**
@@ -145,7 +170,7 @@ ImFont* font = io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels, &config);
🆕 **Since 1.92, with an up to date backend: specifying glyph ranges is unnecessary.**
```cpp
// Load a first font
ImFont* font = io.Fonts->AddFontDefault();
ImFont* font = io.Fonts->AddFontDefaultVector();
ImFontConfig config;
config.MergeMode = true;
io.Fonts->AddFontFromFileTTF("DroidSans.ttf", 0.0f, &config); // Merge into first font to add e.g. Asian characters
@@ -202,7 +227,7 @@ if (ImGui::Button(u8"ロード"))
{
// do stuff
}
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::InputText("string", buf, IM_COUNTOF(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
@@ -228,6 +253,7 @@ ImFontConfig font_cfg;
font_cfg.FontDataOwnedByAtlas = false;
ImFont* font = io.Fonts->AddFontFromMemoryTTF(data, data_size, size_pixels, &font_cfg);
```
IMPORTANT: Since 1.92, when using `FontDataOwnedByAtlas = false`, font data needs to available until `atlas->RemoveFont()`, or more typically until a shutdown of the owning context or font atlas. It was not immediately noticeable in 1.92.0 due to a bug in handling `FontDataOwnedByAtlas = false`, which was fixed in 1.92.6.
##### [Return to Index](#index)
@@ -268,7 +294,7 @@ Example Setup:
// Merge icons into default tool font
#include "IconsFontAwesome.h"
ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontDefault();
io.Fonts->AddFontDefaultVector();
ImFontConfig config;
config.MergeMode = true;
config.GlyphMinAdvanceX = 13.0f; // Use if you want to make the icon monospaced
@@ -425,7 +451,7 @@ As an alternative to rendering colorful glyphs using imgui_freetype with `ImGuiF
#### Pseudo-code:
```cpp
// Add font, then register two custom 13x13 rectangles mapped to glyph 'a' and 'b' of this font
ImFont* font = io.Fonts->AddFontDefault();
ImFont* font = io.Fonts->AddFontDefaultVector();
int rect_ids[2];
rect_ids[0] = io.Fonts->AddCustomRectFontGlyph(font, 'a', 13, 13, 13+1);
rect_ids[1] = io.Fonts->AddCustomRectFontGlyph(font, 'b', 13, 13, 13+1);
@@ -438,7 +464,7 @@ unsigned char* tex_pixels = nullptr;
int tex_width, tex_height;
io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_width, &tex_height);
for (int rect_n = 0; rect_n < IM_ARRAYSIZE(rect_ids); rect_n++)
for (int rect_n = 0; rect_n < IM_COUNTOF(rect_ids); rect_n++)
if (const ImTextureRect* rect = io.Fonts->GetCustomRect(rect_ids[rect_n]))
{
// Fill the custom rectangle with red pixels (in reality you would draw/copy your bitmap data here!)
@@ -538,7 +564,20 @@ You can use the `UTF-8 Encoding viewer` in `Metrics/Debugger` to verify the cont
## Credits/Licenses For Fonts Included In Repository
Some fonts files are available in the `misc/fonts/` folder:
Embedded in source code:
**ProggyClean.ttf**, by Tristan Grimmer
<br>MIT License
<br>(recommended loading setting: Size = 13.0, GlyphOffset.y = +1, PixelSnapH = true)
<br>https://github.com/bluescan/proggyfonts
**ProggyForever.ttf**, by Disco Hello, Tristan Grimmer
<BR>MIT License
<BR>https://github.com/ocornut/proggyforever
Extra fonts files are available in the `misc/fonts/` folder.
Compared to 2014 when they were first introduced, we now have better font support and we embed ProggyForever.
I believe all the files here are unnecessary nowadays. You can find font yourself. They might eventually be removed.
**Roboto-Medium.ttf**, by Christian Robetson
<br>Apache License 2.0
@@ -553,15 +592,10 @@ Some fonts files are available in the `misc/fonts/` folder:
<br>Apache License 2.0
<br>https://www.fontsquirrel.com/fonts/droid-sans
**ProggyClean.ttf**, by Tristan Grimmer
<br>MIT License
<br>(recommended loading setting: Size = 13.0, GlyphOffset.y = +1)
<br>http://www.proggyfonts.net/
**ProggyTiny.ttf**, by Tristan Grimmer
<br>MIT License
<br>(recommended loading setting: Size = 10.0, GlyphOffset.y = +1)
<br>http://www.proggyfonts.net/
<br>https://github.com/bluescan/proggyfonts
**Karla-Regular.ttf**, by Jonathan Pinhorn
<br>SIL OPEN FONT LICENSE Version 1.1
@@ -587,15 +621,14 @@ Some fonts files are available in the `misc/fonts/` folder:
#### MONOSPACE FONTS
Pixel Perfect:
- Proggy Fonts, by Tristan Grimmer http://www.proggyfonts.net or http://upperboundsinteractive.com/fonts.php
- Sweet16, Sweet16 Mono, by Martin Sedlak (Latin + Supplemental + Extended A) https://github.com/kmar/Sweet16Font (also include an .inl file to use directly in dear imgui.)
<img width="1172" height="715" alt="image" src="https://github.com/user-attachments/assets/c9702534-4877-41c9-ae0d-252933c26ced" />
Regular:
- Google Noto Mono Fonts https://www.google.com/get/noto/
- Typefaces for source code beautification https://github.com/chrissimpkins/codeface
- Programmation fonts http://s9w.github.io/font_compare/
- Inconsolata http://www.levien.com/type/myfonts/inconsolata.html
- Proggy Fonts, by Tristan Grimmer https://github.com/bluescan/proggyfonts
- Sweet16, Sweet16 Mono, by Martin Sedlak (Latin + Supplemental + Extended A) https://github.com/kmar/Sweet16Font
- Google Noto Mono Fonts: https://www.google.com/get/noto/
- Typefaces for source code beautification: https://github.com/chrissimpkins/codeface
- Programmation fonts: http://s9w.github.io/font_compare/
- Inconsolata: http://www.levien.com/type/myfonts/inconsolata.html
- Adobe Source Code Pro: Monospaced font family for ui & coding environments https://github.com/adobe-fonts/source-code-pro
- Monospace/Fixed Width Programmer's Fonts http://www.lowing.org/fonts/
+17 -10
View File
@@ -39,10 +39,12 @@ Dear ImGui is particularly suited to integration in game engines (for tooling),
### Usage
**The core of Dear ImGui is self-contained within a few platform-agnostic files** which you can easily compile in your application/engine. They are all the files in the root folder of the repository (imgui*.cpp, imgui*.h). **No specific build process is required**. You can add the .cpp files into your existing project.
**The core of Dear ImGui is self-contained within a few platform-agnostic files** which you can easily compile in your application/engine. They are all the files in the root folder of the repository (`imgui*.cpp`, `imgui*.h`). **No specific build process is required**: you can add all files into your existing project.
**Backends for a variety of graphics API and rendering platforms** are provided in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder, along with example applications in the [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder. You may also create your own backend. Anywhere where you can render textured triangles, you can render Dear ImGui.
C++20 users wishing to use a module may the use [stripe2933/imgui-module](https://github.com/stripe2933/imgui-module) third-party extension.
See the [Getting Started & Integration](#getting-started--integration) section of this document for more details.
After Dear ImGui is set up in your application, you can use it from \_anywhere\_ in your program loop:
@@ -50,7 +52,7 @@ After Dear ImGui is set up in your application, you can use it from \_anywhere\_
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::InputText("string", buf, IM_COUNTOF(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
![sample code output (dark, segoeui font, freetype)](https://user-images.githubusercontent.com/8225057/191050833-b7ecf528-bfae-4a9f-ac1b-f3d83437a2f4.png)
@@ -107,22 +109,26 @@ Reading the changelogs is a good way to keep up to date with the things Dear ImG
### Demo
Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcasing a variety of features and examples. The code is always available for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).
Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcasing a variety of features and examples. The code is always available for reference in `imgui_demo.cpp`.
- [Web version of the demo](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html) courtesy of [@pthom](https://github.com/pthom).
- [Screenshot of the demo](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).
You should be able to build the examples from sources. If you don't, let us know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
- [imgui-demo-binaries-20250625.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20250625.zip) (Windows, 1.92.0, built 2025/06/25, master) or [older binaries](https://www.dearimgui.com/binaries).
The demo applications are not DPI aware so expect some blurriness on a 4K screen. For DPI awareness in your application, you can load/reload your font at a different scale and scale your style with `style.ScaleAllSizes()` (see [FAQ](https://www.dearimgui.com/faq)).
### Getting Started & Integration
See the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) guide for details.
On most platforms and when using C++, **you should be able to use a combination of the [imgui_impl_xxxx](https://github.com/ocornut/imgui/tree/master/backends) backends without modification** (e.g. `imgui_impl_win32.cpp` + `imgui_impl_dx11.cpp`). If your engine supports multiple platforms, consider using more imgui_impl_xxxx files instead of rewriting them: this will be less work for you, and you can get Dear ImGui running immediately. You can _later_ decide to rewrite a custom backend using your custom engine functions if you wish so.
Integrating Dear ImGui within your custom engine is a matter of 1) wiring mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render engine 3) providing a render function that can bind textures and render textured triangles, which is essentially what Backends are doing. The [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is populated with applications doing just that: setting up a window and using backends. If you follow the [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) guide it should in theory take you less than an hour to integrate Dear ImGui. **Make sure to spend time reading the [FAQ](https://www.dearimgui.com/faq), comments, and the examples applications!**
Integrating Dear ImGui within your custom engine is a matter of mainly 1) wiring mouse/keyboard/gamepad inputs 2) uploading a texture to your GPU/render engine 3) providing a render function that can create/update textures and render textured triangles. This is exactly what backends are doing.
- The [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is populated with applications setting up a window and using standard backends.
- The [Getting Started](https://github.com/ocornut/imgui/wiki/Getting-Started) guide has instructions to integrate imgui into an existing application using standard backends. It should in theory take you less than an hour to integrate Dear ImGui into your existing codebase where support libraries are linked. Less if you read carefully.
- The [Backends](https://github.com/ocornut/imgui/blob/master/docs/BACKENDS.md) guide explains what backends are doing, and has instructions to implement a custom backend. You can also refer to the source code of our ~20 backends to understand how they work.
- Generally, **make sure to spend time reading the [FAQ](https://www.dearimgui.com/faq), comments, and the examples applications!**
Officially maintained backends/bindings (in repository):
Officially maintained backends (in repository):
- Renderers: DirectX9, DirectX10, DirectX11, DirectX12, Metal, OpenGL/ES/ES2, SDL_GPU, SDL_Renderer2/3, Vulkan, WebGPU.
- Platforms: GLFW, SDL2/SDL3, Win32, Glut, OSX, Android.
- Frameworks: Allegro5, Emscripten.
@@ -130,7 +136,7 @@ Officially maintained backends/bindings (in repository):
[Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Bindings) wiki page:
- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell, Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin, Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig...
- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder, Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio, GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum, Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop, px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5, UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/cimgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearimgui/dear_bindings)), you can use their metadata output to generate bindings for other languages.
- Many bindings are auto-generated (by good old [cimgui](https://github.com/cimgui/cimgui) or our newer [dear_bindings](https://github.com/dearimgui/dear_bindings)), you can use their metadata output to generate bindings for other languages.
[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting, software renderers, remote network access, memory editors, gizmos, etc. Notable and well supported extensions include [ImPlot](https://github.com/epezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine).
@@ -203,7 +209,7 @@ Dear ImGui is using software and services provided free of charge for open sourc
Credits
-------
Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors) to the GitHub. The early version of this library was developed with the support of [Media Molecule](https://www.mediamolecule.com) and first used internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS Vita).
Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors) to the GitHub. The early version of this library was developed with the support of [Media Molecule](https://www.mediamolecule.com) and first used internally on the game [Tearaway](https://youtu.be/w0oxBviRGlU) (PS Vita).
Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rokups) (2020-2022): a good portion of work on automation system and regression tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine).
@@ -211,7 +217,8 @@ Maintenance/support contracts, sponsoring invoices and other B2B transactions ar
Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games.com) where Atman Binstock had dropped his own simple implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating and improving it."
Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer (MIT license).
Embeds [ProggyClean](https://www.proggyfonts.net) font by Tristan Grimmer (MIT license).
<br>Embeds [ProggyForever](https://github.com/ocornut/proggyforever) fonts by Disco Hello, Tristan Grimmer (MIT license).
<br>Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.com/nothings/stb/) by Sean Barrett (public domain).
Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. Special thanks to Alex Evans, Patrick Doane, Marco Koegler for kindly helping. Also thank you to everyone posting feedback, questions and patches on GitHub.
+1 -2
View File
@@ -87,7 +87,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- input text multi-line: line numbers? status bar? (follow up on #200)
- input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725)
- input text multi-line: better horizontal scrolling support (#383, #1224)
- input text multi-line: single call to AddText() should be coarse clipped on InputTextEx() end.
- input number: optional range min/max for Input*() functions
- input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
- input number: use mouse wheel to step up/down
@@ -352,7 +351,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- examples: window minimize, maximize (#583)
- examples: provide a zero frame-rate/idle example.
- examples: dx11/dx12: try to use new swapchain blit models (#2970)
- examples: dx11/dx12: try to use new swapchain blit models (#2970, #9031)
- backends: report it better when not able to create texture?
- backends: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
- backends: opengl: rename imgui_impl_opengl2 to impl_opengl_legacy and imgui_impl_opengl3 to imgui_impl_opengl? (#1900)