v1.92.0: Scaling fonts & many more (big release)
β€οΈ Previous summer was the 10th anniversary of v1.00! Read: 10 years of Dear ImGui ! π
β Reading the changelog is a good way to keep up to date with what Dear ImGui has to offer, and will give you ideas of some features that you've been ignoring until now!
π£ If you are browsing multiple releases: click version number above to display full release note contents, otherwise it is badly clipped by GitHub!
Links: Homepage - Release notes - FAQ - Issues, Q&A. Also see our Wiki with sections such as..
- Getting Started (~25 lines in an existing app)
- Useful Extensions/Widgets
- Software using Dear ImGui
- Bindings & Backends
- and more! π
Dear ImGui is funded by your contributions and absolutely needs them to sustain and grow. We can invoice and accommodate to many situations. If your company uses Dear ImGui, please reach out. See Funding page. Did you know? If you need an excuse to pay, you may buy licenses for Test Engine and buy hours of support (and cough not use them all) and that will contribute to fund Dear ImGui.
β€οΈ Thanks to recent years sponsors β€οΈ
- G3Dvu !
- OTOY !
- Riot Games !
- Scorewarrior !
- Supercell !
- Tanius Technology !
- Valve !
- Aras P !
- Asobo Studio !
- FUTO !
- Gravity Well !
- id Software !
- Lucid Games !
- MachineGames !
- Mobigame !
- Planestate Software !
- SCS Software !
- Sebastian SchΓΆner !
β€οΈ And many individuals β€οΈ
Thanks to @GamingMinds-DanielC, @PathogenDavid & more for their help with GitHub answers!
TL;DR;
- Added protocol for backends to create, update, destroy textures.
- Fonts may be rendered at any size. Glyphs are loaded and rasterized dynamically. No need to specify ranges, prebake etc. (*)
- Fonts may be added, removed, reconfigured at any time. Easier to e.g. live compare FreeType features. (*)
- Many fonts related changes (but more will come: actually tried to keep those to a minimum for 1.92.0).
- Much easier to pack and manipulate custom data in the dynamic atlas.
- Retina screen rendering works by default (with conforming backend) by updating rasterizer density.
- Updated 13 standard backends to support the new
ImGuiBackendFlags_RendererHasTextures
feature. - Other stuff: Tree can draw hierarchy outlines. Better Child window resizing. InputText fixes. Tables fixes. Keyboard/Gamepad Nav fixes. Error Handling improvements, Backends improvements/fixes.
- Submitted PR/fixes for various popular extensions such as ImPlot to work fine with this.
(*) with an updated backend.
This is generally "old school" tech but written conscientiously to be highly portable and efficient, to serve the need of real-time internal tooling and to allow a decent transition with the countless codebases and millions lines of code written using Dear ImGui. We still don't support RTL, bi-directional editing, and text shaping.
2025-01-27.font.resize.mp4
(old video but presently I can't be bothered to make a fancier one)
Using a Custom Backend?
π Need help updating your custom rendering backend to support ImGuiBackendFlags_RendererHasTextures
?
You can read the newly improved docs/BACKENDS.md.
Here are the main changes done to all backends:
- Allegro5: ee8941e (+35 lines)
- DirectX9: 75efba7 (+48 lines)
- DirectX10: 2d2b1bc (+40 lines)
- DirectX11: 372fd27 (+40 lines)
- DirectX12: eefe5d5 (+87 lines)
- Metal: 26c017d (+55 lines)
- OpenGL Legacy: 0430c55 (+25 lines)
- OpenGL3/WebGL/ES: dbb91a5 (+47 lines)
- SDL_Renderer2: 9fa65cd (+20 lines)
- SDL_Renderer3: e538883 (+19 lines)
- SDL_GPU: 16fe666 (+41 lines)
- Vulkan: abe294b (+33 lines)
- WGPU: 571dae9 (+30 lines)
Changes (since v1.91.9b)
π£ THIS VERSION CONTAINS THE LARGEST AMOUNT OF BREAKING CHANGES SINCE 2015! I TRIED REALLY HARD TO KEEP THEM TO A MINIMUM, REDUCE THE AMOUNT OF INTERFERENCE, BUT INEVITABLY SOME USERS OR THIRD-PARTY EXTENSIONS WILL BE AFFECTED.
π£ IN ORDER TO HELP US IMPROVE THE TRANSITION PROCESS, INCL. DOCUMENTATION AND COMMENTS, PLEASE REPORT ANY DOUBT, CONFUSION, QUESTIONS, YOU CAN SKIM #8465 AND THEN PLEASE OPEN A NEW ISSUE.
π£ If you are using custom widgets, internals or third-party extension that are somehow breaking and aren't obvious how to solve, please post in Issues so we can gather data and share solutions that may help others.
π£ As part of the plan to reduce impact of API breaking changes, several unfinished changes/features/refactors related to font and text systems and scaling will be part of subsequent releases (1.92.1+).
π£ If you are updating from an old version, and expecting a massive or difficult update, consider first updating to 1.91.9 to reduce the amount of changes.
Breaking Changes:
- Fonts: IMPORTANT: if your app was solving the OSX/iOS Retina screen specific logical vs display scale problem by setting
io.DisplayFramebufferScale
(e.g. to 2.0f) + settingio.FontGlobalScale
(e.g. to 1.0f/2.0f) + loading fonts at scaled sizes (e.g. size X * 2.0f):- This WILL NOT map correctly to the new system! Because font will rasterize as requested size.
- With a legacy backend (< 1.92):
- Instead of setting
io.FontGlobalScale = 1.0f/N
, setImFontCfg::RasterizerDensity = N
. - This already worked before, but is now pretty much required.
- Instead of setting
- With a new backend (1.92+),
- This should be all automatic.
FramebufferScale
is automatically used to set current fontRasterizerDensity
.FramebufferScale
is a per-viewport property provided by backend through thePlatform_GetWindowFramebufferScale()
handler in 'docking' branch.
- Fonts: IMPORTANT on Font Sizing:
- Before 1.92, fonts were of a single size. They can now be dynamically sized.
PushFont()
API now has a REQUIRED size parameter.
void PushFont(ImFont* font)
-->void PushFont(ImFont* font, float size)
PushFont(font, 0.0f) // Change font and keep current size
PushFont(NULL, 20.0f) // Keep font and change current size
PushFont(font, 20.0f) // Change font and set size to 20.0f
PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior, for fixed size fonts.
- To use old behavior use
ImGui::PushFont(font, font->LegacySize)
at call site. We intentionally didn't add a default parameter because it would make the long-term transition more difficult. - Kept inline redirection font. Will obsolete.
- Global scale factors may be applied over the provided size. This is why it is called
FontSizeBase
in the style structure. - Global scale factors are:
style.FontScaleMain
,style.FontScaleDpi
and maybe more. ImFont::FontSize
was removed and does not make sense anymore.ImFont::LegacySize
is the size passed toAddFont()
.- Removed support for old
PushFont(NULL)
which was a shortcut for "revert to default font". - Renamed/moved
io.FontGlobalScale
tostyle.FontScaleMain
.
- Fonts: IMPORTANT on Font Merging:
- When searching for a glyph in multiple merged fonts: font inputs are now scanned in order for the first font input which the desired glyph. This is technically a different behavior than before!
- e.g. If you are merging fonts you may have glyphs that you expected to load from Font Source 2 which exists in Font Source 1. After the update and when using a new backend, those glyphs may now loaded from Font Source 1!
- You can use
Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool
to see list of glyphs available in multiple font sources. This can facilitate understanding which font input is providing which glyph. - You can use
ImFontConfig::GlyphExcludeRanges[]
to specify ranges to ignore in given Input:
// Add Font Source 1 but ignore ICON_MIN_FA..ICON_MAX_FA range
static ImWchar exclude_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
ImFontConfig cfg1;
cfg1.GlyphExcludeRanges = exclude_ranges;
io.Fonts->AddFontFromFileTTF("segoeui.ttf", 0.0f, &cfg1);
// Add Font Source 2, which expects to use the range above
ImFontConfig cfg2;
cfg2.MergeMode = true;
io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
- Textures:
- All API functions taking a
ImTextureID
parameter are now taking a 'ImTextureRef`:ImTextureRef
is a small composite structure which may be constructed from aImTextureID
(or constructed from aImTextureData*
which represent a texture which will generally be ready by the time of rendering).- Affected functions are:
ImGui::Image()
,ImGui::ImageWithBg()
,ImGui::ImageButton()
,ImDrawList::AddImage()
,ImDrawList::AddImageQuad()
,ImDrawList::AddImageRounded()
.
- We suggest that C users and any higher-level language bindings generators may facilitate converting this in some way, aka emulating the trivial C++ constructor.
- All API functions taking a
- Fonts: obsoleted
ImFontAtlas::GetTexDataAsRGBA32()
,GetTexDataAsAlpha8()
,Build()
,SetTexID()
andIsBuilt()
functions. The new protocol for backends to handle textures doesn't need them. Kept redirection functions (will obsolete).- A majority of old backends should still work with new code (behaving like they did before).
- Calling
ImFontAtlas::Build()
before initializing new backends will erroneously trigger preloading all glyphs. Will be detected with an assertion after the backend is initialized.
- Fonts:
ImFontConfig::OversampleH
/OversampleV
default to automatic (== 0) since v1.91.8. It is quite important you keep it automatic until we decide if we want to provide a way to express finer policy, otherwise you will likely waste texture space when using large glyphs. Note that theimgui_freetype
backend doesn't use and does not need oversampling. - Fonts: specifying glyph ranges is now unnecessary.
- The value of
ImFontConfig::GlyphRanges[]
is only useful for legacy backends. - All
GetGlyphRangesXXXX()
functions are now marked obsolete:GetGlyphRangesDefault()
,GetGlyphRangesGreek()
,GetGlyphRangesKorean()
,GetGlyphRangesJapanese()
,GetGlyphRangesChineseSimplifiedCommon()
,GetGlyphRangesChineseFull()
,GetGlyphRangesCyrillic()
,GetGlyphRangesThai()
,GetGlyphRangesVietnamese()
.
- The value of
- Fonts: removed
ImFontAtlas::TexDesiredWidth
to enforce a texture width. (#327) (it vaguely made sense with the old system as if unspecified textures width maxed up to 4096 but that limit isn't necessary anymore, and Renderer_TextureMaxWidth covers this). However you may setatlas->TexMinWidth == atlas->TexMaxWidth
for the same effect. - Fonts: if you create and manage
ImFontAtlas
instances yourself (instead of relying onImGuiContext
to create one, you'll need to callImFontAtlasUpdateNewFrame()
yourself. An assert will trigger if you don't. - Fonts: obsoleted
ImGui::SetWindowFontScale()
which is not useful anymore. Prefer usingPushFont(NULL, style.FontSizeBase * factor)
or to manipulate other scaling factors. - Fonts: obsoleted
ImFont::Scale
which is not useful anymore. - Fonts: changed
ImFont::CalcWordWrapPositionA()
toImFont::CalcWordWrapPosition()
:- old:
const char* CalcWordWrapPositio 8000 nA(float scale, const char* text, ....);
- new:
const char* CalcWordWrapPosition (float size, const char* text, ....);
The leadingfloat scale
parameters was changed tofloat size
. This was necessary asscale
is assuming a unique font size. Kept inline redirection function assuming usingfont->LegacySize
.
- old:
- Fonts: generally reworked Internals of
ImFontAtlas
andImFont
. While in theory a vast majority of users shouldn't be affected, some use cases or extensions might be. Among other things:ImDrawCmd::TextureId
has been changed toImDrawCmd::TexRef
.ImFontAtlas::ConfigData[] has been renamed to
ImFontAtlas::Sources[]`.ImFont::ConfigData[]
,ConfigDataCount
has been renamed toSources[]
,SourceCount
.- Each
ImFont
has a number ofImFontBaked
instances corresponding to actively used sizes.ImFont::GetFontBaked(size)
retrieves the one for a given size. - Fields moved from
ImFont
toImFontBaked
:ImFont::IndexAdvanceX[]
->ImFontBaked::IndexAdvanceX[]
ImFont::Glyphs[]
->ImFontBaked::Glyphs[]
ImFont::Ascent
,Descent
->ImFontBaked::Ascent
,Descent
ImFont::FindGlyph()
->ImFontBaked::FindGlyph()
ImFont::FindGlyphNoFallback()
->ImFontBaked::FindGlyphNoFallback()
ImFont::GetCharAdvance()
->ImFontBaked::GetCharAdvance()
- Widget code may use
ImGui::GetFontBaked()
instead ofImGui::GetFont()
to access font data for current font at current font size.
(and you may usefont->GetFontBaked(size)
to access it for any other size.)
g.Font
==ImGui::GetFont()
g.FontSize
==ImGui::GetFontSize()
g.FontBaked
==ImGui::GetFontBaked()
==ImGui::GetFont()->GetFontBaked(ImGui::GetFontSize())
Please report if you are affected!
- Fonts: (users of imgui_freetype)
- renamed
ImFontAtlas::FontBuilderFlags
toImFontAtlas::FontLoaderFlags
. - renamed
ImFontConfig::FontBuilderFlags
toImFontConfig::FontLoaderFlags
. - renamed
ImGuiFreeTypeBuilderFlags
toImGuiFreeTypeLoaderFlags
. - if you used runtime
imgui_freetype
selection rather than the default compile-time option provided byIMGUI_ENABLE_FREETYPE
:- renamed/reworked
ImFontBuilderIO
intoImFontLoader
, - renamed
ImGuiFreeType::GetBuilderForFreeType()
toImGuiFreeType::GetFontLoader()
- old:
io.Fonts->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType();
- new:
io.Fonts.FontLoader = ImGuiFreeType::GetFontLoader();
- old:
- renamed/reworked
- renamed
- DrawList: Renamed
ImDrawList::PushTextureID()
/PopTextureID()
toPushTexture()
/PopTexture()
. - Fonts: (users of custom rectangles)
- Renamed
AddCustomRectRegular()
toAddCustomRect()
. (#8466) - Added
GetCustomRect()
as a replacement forGetCustomRectByIndex()
+CalcCustomRectUV()
. (#8466) - The output type of
GetCustomRect()
is nowImFontAtlasRect
, which include UV coordinates.ImFontAtlasCustomRect::X
-->ImFontAtlasRect::x
ImFontAtlasCustomRect::Y
-->ImFontAtlasRect::y
ImFontAtlasCustomRect::Width
-->ImFontAtlasRect::w
ImFontAtlasCustomRect::Height
-->ImFontAtlasRect::h
Before:
- Renamed
const ImFontAtlasCustomRect* r = atlas->GetCustomRectByIndex(custom_rect_id);
ImVec2 uv0, uv1;
atlas->GetCustomRectUV(r, &uv0, &uv1);
ImGui::Image(atlas->TexRef, ImVec2(r->w, r->h), uv0, uv1);
After:
ImFontAtlasRect r;
atlas->GetCustomRect(custom_rect_id, &r);
ImGui::Image(atlas->TexRef, ImVec2(r.w, r.h), r.uv0, r.uv1);
We added a redirecting typedef but haven't attempted to magically redirect the field names, as this API is rarely used and the fix is simple.
- Obsoleted
AddCustomRectFontGlyph()
as the API does not make sense for scalable fonts:- Kept existing function which uses the font "default size" (
Sources[0]->LegacySize
). - Added a helper
AddCustomRectFontGlyphForSize()
which is immediately marked obsolete, but can facilitate transitioning old code. - Prefer adding a font source (
ImFontConfig
) using a custom/procedural loader.
- Kept existing function which uses the font "default size" (
- Backends: removed
ImGui_ImplXXXX_CreateFontsTexture()
/ImGui_ImplXXXX_DestroyFontsTexture()
for all backends that had them. They should not be necessary any more.- removed
ImGui_ImplMetal_CreateFontsTexture()
,ImGui_ImplMetal_DestroyFontsTexture()
. - removed
ImGui_ImplOpenGL2_CreateFontsTexture()
,ImGui_ImplOpenGL2_DestroyFontsTexture()
. - removed
ImGui_ImplOpenGL3_CreateFontsTexture()
,ImGui_ImplOpenGL3_DestroyFontsTexture()
. - removed
ImGui_ImplSDLGPU3_CreateFontsTexture()
,ImGui_ImplSDLGPU3_DestroyFontsTexture()
. - removed
ImGui_ImplSDLRenderer2_CreateFontsTexture()
,ImGui_ImplSDLRenderer2_DestroyFontsTexture()
. - removed
ImGui_ImplSDLRenderer3_CreateFontsTexture()
,ImGui_ImplSDLRenderer3_DestroyFontsTexture()
. - removed
ImGui_ImplVulkan_CreateFontsTexture()
,ImGui_ImplVulkan_DestroyFontsTexture()
.
- removed
- Layout: commented out legacy
ErrorCheckUsingSetCursorPosToExtendParentBoundaries()
fallback obsoleted in 1.89 (August 2022) which allowed aSetCursorPos()
/SetCursorScreenPos()
call WITHOUT AN ITEM to extend parent window/cell boundaries. Replaced with assert/tooltip that would already happens if previously usingIMGUI_DISABLE_OBSOLETE_FUNCTIONS
. (#5548, #4510, #3355, #1760, #1490, #4152, #150)- Incorrect way to make a window content size 200x200:
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + End();
- Correct ways to make a window content size 200x200:
Begin(...) + SetCursorScreenPos(GetCursorScreenPos() + ImVec2(200,200)) + Dummy(ImVec2(0,0)) + End();
Begin(...) + Dummy(ImVec2(200,200)) + End();
- TL;DR; if the assert triggers, you can add a
Dummy({0,0})
call to validate extending parent boundaries.
- Incorrect way to make a window content size 200x200:
- TreeNode: renamed
ImGuiTreeNodeFlags_NavLeftJumpsBackHere
toImGuiTreeNodeFlags_NavLeftJumpsToParent
for clarity. Kept inline redirection enum (will obsolete). (#1079, #8639) - Commented out
PushAllowKeyboardFocus()
/PopAllowKeyboardFocus()
which was obsoleted in 1.89.4 (March 2023). (#3092)PushAllowKeyboardFocus(bool tab_stop)
-->PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop);
PopAllowKeyboardFocus()
-->PopItemFlag();
- Commented out
ImGuiListClipper::ForceDisplayRangeByIndices()
which was obsoleted in 1.89.6 (June 2023).ForceDisplayRangeByIndices()
-->IncludeItemsByIndex()
- Backends: SDL3: Fixed casing typo in function name: (#8509, #8163, #7998, #7988) [@puugz]
Imgui_ImplSDLGPU3_PrepareDrawData()
-->ImGui_ImplSDLGPU3_PrepareDrawData()
- Internals:
RenderTextEllipsis()
function removed the 'float clip_max_x' parameter directly preceding 'float ellipsis_max_x'. Values were identical for a vast majority of users. (#8387)
Non-breaking Fonts/Textures related changes:
- Textures: added partial texture update protocol. (#8465, #3761)
- The Renderer Backend needs to set
io.BackendFlags |= ImGuiBackendFlags_RendererHasTextures
and handle texture updates requests. - New structs:
ImTextureData
,ImTextureRect
. - New enums:
ImTextureStatus
,ImTextureFormat
. - During its
ImGui_ImplXXXX_RenderDrawData()
call, the backend can now access a texture list inImDrawData::Textures[]
. Textures may have four distinct states:ImTextureStatus_WantCreate
: requesting backend to create a texture.ImTextureStatus_WantUpdates
: requesting backend to copy given blocks from the CPU side copy of the texture to your graphics pipeline. Atex->Updates[]
list of update is provided as well as a singletex->UpdatesRect
bounding box.ImTextureStatus_WantDestroy
: requesting backend to destroy the texture.- A
int UnusedFrames
value is provided to conveniently defer destroying. - Backend is generally free to destroy textures whenever they like.
- A
ImTextureStatus_OK
: nothing to do.
- Almost all standard backends have been updated to support this.
- Backends have allowed to destroy textures at any time if they desire so. A list is available in
platform_io.Textures[]
for this purpose and for backend shutdown. - Both
stb_truetype
andFreeType
backends have been updated to work with the new system, and they now share more code than before. - Added
#define IMGUI_HAS_TEXTURES
to facilitate compile-time checks for third-party extensions until this is merged with a definitive version number to check.
- The Renderer Backend needs to set
- Fonts: font backend/loader may easily be changed dynamically, allowing users to compare rasterizers outputs and features.
imgui_freetype
is generally beneficial. - Fonts:
ImFontAtlas::AddFontXXX()
functions may be called at any time during the frame. - Fonts:
ImFontAtlas::AddFontXXX()
can fail more gracefully if error handling is configured to not assert (this will be better exposed via future font flags). - Fonts: added
style.FontScaleBase
scaling factor (previously calledio.FontGlobalScale
). - Fonts: added
style.FontScaleDpi
scaling factor. This is designed to be be changed on per-monitor/per-viewport basis, whichio.ConfigDpiScaleFonts
does automatically (which is why it is separate fromstyle.FontScaleBase
). - Fonts: added font_size parameter to
ImGui::PushFont()
function. - Fonts: added
ImFontAtlas::RemoveFont()
function. - Fonts: added
ImFontAtlas::CompactCache()
function. - Fonts: added
ImFontAtlas::TexDesiredFormat
field (default toImTextureFormat_RGBA32
, may be changed toImTextureFormat_Alpha8
). - Fonts: added
ImFontAtlas::TexMinWidth
,TexMinHeight
,TexMaxWidth
,TexMaxHeight
fields. - Fonts: added
ImFontConfig::PixelSnapV
to align scaledGlyphOffset.y
to pixel boundaries. - Fonts: added
ImFontConfig::GlyphExcludeRanges[]
, which behave similarly toImFontConfig::GlyphRanges[]
, but has the opposite meaning. It is tailored to situations where merged fonts have overlapping characters. - Fonts: added
"Input Glyphs Overlap Detection Tool"
which dumps a list of glyphs provided by merged sources, which may help setting up aGlyphExcludeRanges[]
filter. - Fonts: added
ImFontAtlas::FontBackendName
(which is surfaced in the "About Dear ImGui" window and other locations). - Fonts: added
ImFontFlags
(currently needs to be passed throughImFontConfig
until we revamp font loading API):ImFontFlags_NoLoadError
: disable erroring/assert when callingAddFontXXX()
with missing file/data. Calling code is expected to checkAddFontXXX()
return value.ImFontFlags_NoLoadGlyphs
: disable loading new glyphs.ImFontFlags_LockBakedSizes
: disable loading new baked sizes, disable garbage collecting current ones. e.g. if you want to lock a font to a single size.
- Fonts: the general design has changed toward meaning that a
ImFont
doesn't have have a specific size: it may be bound and drawn with any size.- We store
ImFontBaked
structures internally, which are a cache of information for a given size being drawn. You should not need to deal with ImFontBaked directly. ImFontBaked
structures may be cleaned up between frames when unused, pointers to them are only valid for the current frame.- Added
ImFontBaked::IsGlyphLoaded()
function.
- We store
- Fonts: Custom Rect packing has generally been reworked. (#8107, #7962, #1282)
ImFontAtlas::AddCustomRect()
(previouslyAddCustomRectRegular()
/AddCustomRectFontGlyph()
) functions will immediately return a packed rectangle identifier, and you can write your pixels immediately - previously had to wait for Build() to be called. This is also the case when using a legacy backend.- Custom packed rectangles may be moved during a texture change, aka practically anytime. Always refer to latest uvs/position returned by
GetCustomRect()
! AddCustomRect()
returnsImFontAtlasRectId_Invalid
on failure.- Added
ImFontAtlas::RemoveCustomRect()
function. GetCustomRect()
can safely return false and not crash when passed an invalid or removed id.
- Fonts: texture is now stored in a single format CPU side (save ~25% when using RGBA).
- Fonts: changing current font to one from a different atlas is supported. (#8080)
- Fonts: automatic baking of an "..." ellipsis works better with monospace fonts.
- Fonts: each
ImFontConfig
font source may provide a custom backend/loader. - Fonts: added
platform_io.Renderer_TextureMaxWidth
/Renderer_TextureMaxHeight
fields for Renderer Backend to specify if there is a maximum accepted texture size (not yet used). - Fonts: added compile-time overridable
#define ImTextureID_Invalid 0
if you need 0 to be a valid low-level texture identifier. - Fonts: reworked text ellipsis logic to ensure a "..." is always displayed instead of a single character. (#7024)
- Fonts: word-wrapping code handle ideographic comma & full stop (U+3001, U+3002). (#8540)
- Fonts: fixed
CalcWordWrapPosition()
fallback when width is too small to wrap: would use a +1 offset instead of advancing to the next UTF-8 codepoint. (#8540) - Debug Tools: Fonts section: add font preview, add
"Remove"
button, add"Load all glyphs"
button, add selection to change font backend when both are compiled in. - Renderer Backends:
- Backends: DX9/DX10/DX11/DX12, Vulkan, OpenGL2/3, Metal, SDLGPU3, SDLRenderer2/3, WebGPU, Allegro5:
- Added
ImGuiBackendFlags_RendererHasTextures
support for all backends. (#8465, #3761, #3471) [@ocornut, @ShironekoBen, @thedmd] - Added
ImGui_ImplXXXX_UpdateTexture(ImTextureData* tex)
functions for all backends. Available if you want to start uploading textures right after ImGui::Render() and without waiting for the call toImGui_ImplXXXX_RenderDrawData()
. Also useful if you use a staged or
multi-threaded rendering schemes, where you might want to setImDrawData::Textures = NULL
. (#8597, #1860)
- Added
- Backends: DX9/DX10/DX11/DX12, Vulkan, OpenGL2/3, Metal, SDLGPU3, SDLRenderer2/3, WebGPU, Allegro5:
- Special thanks for fonts/texture related feedback to: @thedmd, @ShironekoBen, @rodrigorc, @PathogenDavid, @itamago, @rokups, @DucaRii, @Aarkham, @cyfewlp & more.
Other changes:
- IO: variations in analog-only components of gamepad events do not interfere with trickling of mouse position events (#4921, #8508)
- Windows: fixed
SetNextWindowCollapsed()
/SetWindowCollapsed()
bypassing the codepath that preserves last contents size when collapsed, resulting in programmatically uncollapsing auto-sizing windows having them flicker size for a frame. (#7691) [@achabense] - Windows: clicking on a window close button doesn't claim focus and bring to front. (#8683)
- Windows: loosened code to allow hovering of resize grips, borders, and table borders while hovering a sibling child window, so that the code in master matches one in docking (they accidentally diverged). (#8554)
- Windows:
BeginChild()
: fixed being unable to combine manual resize on one axis and automatic resize on the other axis. (#8690) e.g. neitherImGuiChildFlags_ResizeX | ImGuiChildFlags_AutoResizeY
orImGuiChildFlags_ResizeY | ImGuiChildFlags_AutoResizeX
worked before. - TreeNode: added experimental flags to draw tree hierarchy outlines linking parent and tree nodes: (#2920)
ImGuiTreeNodeFlags_DrawLinesNone
: No lines drawn (default value instyle.TreeLinesFlags
).ImGuiTreeNodeFlags_DrawLinesFull
: Horizontal lines to child nodes. Vertical line drawn down toTreePop()
position: cover full contents.ImGuiTreeNodeFlags_DrawLinesToNodes
: Horizontal lines to child nodes. Vertical line drawn down to bottom-most child node.- Added
style.TreeLinesFlags
which stores the default setting, which may be overridden in individual TreeNode() calls. - Added
style.TreeLinesSize
(default to 1.0f). - Added
style.TreeLinesRadius
(default to 0.0f). - Added
ImGuiCol_TreeLines
(in default styles this is the same asImGuiCol_Border
). - Caveats:
- Tree nodes may be used in many creative ways (manually positioning openable nodes in unusual ways, using indent to create tree-looking structures, etc.) and the feature may not accurately represent them in every cases.
- The feature adds a little cost as extra data needs to be stored. (
ImGuiTreeNodeFlags_DrawLinesToNodes
is slower thanImGuiTreeNodeFlags_DrawLinesFull
which may be meaningful on very large trees, as it needs to record bottom-most Y position even for clipped nodes). - The feature is unlikely to ever work properly when using a coarse clipper such as
ImGuiListClipper
.
- TreeNode: fixed incorrect clipping of arrow/bullet when using
ImGuiTreeNodeFlags_SpanAllColumns
. - InputText: fixed cursor positioning issue using up/down keys near end of lines while editing non-ASCII text. (Regression from 1.91.2) (#8635, #7925)
- InputText: fixed a buffer overrun that could happen when using dynamically resizing buffers (e.g.
imgui_stdlib.cpp
forstd::string
, orImGuiInputTextFlags_CallbackRezize
) and programmatically making an insertion. (#8689) [@ocornut, @m9710797] - Tables: fixed
TableHeader()
eager vertical clipping of text which may be noticeable withFramePadding.y
was too small. (#6236) - Tables: fixed an assert when combining Tables, Frozen Rows, Clipper and
BeginMultiSelect()
in a certain order. (#8595, #8250) - Tabs: fixes small issues with how "..." ellipsis moved depending on visibility of Close Button or Unsaved Document marker. (#8387)
- Tooltips: tooltips have a maximum size corresponding to host display/monitor size, which mitigates edge case issues in multi-viewport scenarios where abnormally large windows (e.g. determined programmatically) can lead to renderer backend trying to create abnormally large framebuffers.
- TextLinkOpenURL(): added bool return value on click. (#8645, #8451, #7660)
- Scroll: fixed contents size, scrollbar visibility and scrolling resetting issues with abnormally large contents ranges. (#3609, #8215)
- Clipper: some mitigation/improvements for abnormally large contents ranges. (#3609, #8215)
- Nav: fixed assertion when holding gamepad FaceLeft/West button to open CTRL+Tab windowing + pressing a keyboard key. (#8525)
- Nav: fixed scroll fallback (when there are no interactive widgets to jump to) not being enabled on windows with menu or title bar.
- Nav: fixed an issue handling PageUp/PageDown on windows with abnormally large contents range which could lead to clipper requesting very large ranges.
- Error Handling: added better error report and recovery for extraneous
EndPopup()
call. (#1651, #8499) - Error Handling: added better error report and recovery when calling
EndFrame()
orRender()
withoutNewFrame()
. Was previously only an assert. - Style, InputText: added
ImGuiCol_InputTextCursor
to configure color of the InputText cursor/caret. (#7031) - Platform IME: added
ImGuiPlatformImeData::ViewportId
info (backported from Docking branch). - Platform IME: added
ImGuiPlatformImeData::WantTextInput
which might set independently ofWantVisible
. This is set in the same structure because activating text input generally requires providing a window to the backend. (#8584, #6341) - DrawList: Fixed a regression from 1.91.1 where a
Begin()
/PushFont()
/AddImage()
sequence would not restore the correct atlas Texture Identifier when thePushFont()
call used a font from a different atlas. (#8694, caused by #3224, #3875, #6398, #7903) - Misc: added extra operators to
ImVec4
inIMGUI_DEFINE_MATH_OPERATORS
block. (#8510) [@gan74] - Misc: removed static linkage from operators to facilitate using in C++ modules. (#8682, #8358) [@johmani]
- Demo: changed default framed item width to use
Min(GetFontSize() * 12, GetContentRegionAvail().x * 0.40f)
. - Renderer Backends:
- Backends: SDLGPU3: Fixed creating atlas texture earlier than other backends, preventing to load fonts between the Init and NewFrames calls.
- Backends: SDLGPU3: Made
ImGui_ImplSDLGPU3_PrepareDrawData()
reuse GPU Transfer Buffers which were unusually slow to recreate every frame. Much faster now. (#8534) [@ocornut, @TheMode] - Backends: SDLGPU3: added support for
ImDrawCallback_ResetRenderState
. (#8599) - Backends: OpenGL3: made GLES 3.20 contexts not access
GL_CONTEXT_PROFILE_MASK
norGL_PRIMITIVE_RESTART
. (#8664) [@DyXel] - Backends: DirectX12: Fixed build on MinGW. (#8702, #4594) [@playday3008]
- Backends: DirectX10, DirectX11, DirectX12: Honor
FramebufferScale
to allow for custom platform backends and experiments using it (consistently with other renderer backends, even though in normal condition it is not set under Windows). (#8412) [@WSSDude] - Backends: Vulkan: Deep-copy
ImGui_ImplVulkan_InitInfo::PipelineRenderingCreateInfo
'spColorAttachmentFormats
buffer when set, in order to reduce common user-error of specifying a pointer to data that gets out of scope. (#8282) - Backends: Vulkan: Load dynamic rendering functions using
vkGetDeviceProcAddr()
+ try both non-KHR and KHR versions. (#8600, #8326, #8365) [@ChrisTom-94] - Backends: Vulkan: fixed validation errors in window create/resize helpers used by examples and by multi-viewports implementation, which would typically trigger errors while detaching secondary viewports. (#8600, #8176) [@ChrisTom-94]
- Platform Backends:
- Backends: GLFW: added
ImGui_ImplGlfw_GetContentScaleForMonitor()
,ImGui_ImplGlfw_GetContentScaleForWindow()
helpers. They are wrappers toglfwGetMonitorContentScale()
/glfwGetWindowContentScale()
, with compile-time GLFW version checks + returning 1.0f on Apple platform. - Backends: GLFW: Added support for multiple Dear ImGui contexts. (#8676, #8239, #8069)
- Backends: SDL2: added
ImGui_ImplSDL2_GetDpiScaleForDisplay()
andImGui_ImplSDL2_GetContentScaleForWindow()
helpers. They are wrappers toSDL_GetDisplayDPI()
, with compile-time SDL version checks + returning 1.0f on Apple platforms. SDL3 already does this by default. - Backends: Win32: Fixed an issue where externally losing mouse capture (due to e.g. focus loss) would fail to claim it again the next subsequent click. (#8594)
- Backends: SDL2, SDL3, OSX: Fill gamepad inputs and set
ImGuiBackendFlags_HasGamepad
regardless ofImGuiConfigFlags_NavEnableGamepad
being set. (#8508) - Backends: SDL2, SDL3: don't attempt to call
SDL_CaptureMouse()
on drivers where we don't callSDL_GetGlobalMouseState()
. This is specifically for Wayland but we currently use the same white-list asSDL_GetGlobalMouseState()
. (#8561) [@vs49688] - Backends: GLFW, SDL2, SDL3: include GLFW/SDL version number in
io.BackendPlatformName
. - Backends: SDL3: Update for SDL3 api changes: revert
SDL_GetClipboardText()
memory ownership change. (#8530, #7801) [@Green-Sky] - Backends: SDL3: honor
ImGuiPlatformImeData::WantTextInput
as an alternative way to callSDL_StartTextInput()
, without IME being necessarily visible. (#8584) - Backends: SDL3: fixed pulling
SDL_PROP_WINDOW_COCOA_WINDOW_POINTER
intoviewport->PlatformHandleRaw
. (#8725, #8726) [@eertbleyen] - Backends: OSX:
ImGui_ImplOSX_HandleEvent()
only process event for window containing our view. (#8644) [@BingoXuan]
- Backends: GLFW: added
- Examples:
- Examples: Made many examples DPI aware by default. The single-viewport version is basically:
- Query monitor DPI scale. Helpers are provided in some backends.
- Call
style.ScaleAllSizes()
and setstyle.FontScaleDpi
with this factor.
Multi-viewport applications may set both of those flags: io.ConfigDpiScaleFonts = true;
io.ConfigDpiScaleViewports = true;
Which will scale fonts but NOT style padding/spacings/thicknesses yet.
- Examples: Apple+Metal, Apple+OpenGL: add Makefile (CLion opens them nicely). (#8637) [@pthom]
- Examples: DirectX12+Win32: also test for
IsIconic()
for sleeping since we don't seem to get aDXGI_STATUS_OCCLUDED
signal when minimized. (#8603) [@dooann]
- Examples: Made many examples DPI aware by default. The single-viewport version is basically:
Changes from 1.91.9b to 1.92.0 specific to the Docking+Multi-Viewports branch:
- Viewports: added per-viewport
FramebufferScale
for Retina display multi-monitor support. Backend must provideplatform_io.platform_io.Platform_GetWindowFramebufferScale
handler. This effectively fixes clipping/rendering on multi-monitors with varying Retina scale. (#1065, #1542, #1676, #1786, #2826, #3757, #5081, #5580, #5592, #6465, #7273, #7779 etc.) - 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(). 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. - Backends: Win32: Viewports: handle
WM_DPICHANGED
in backend whenImGuiConfigFlags_DpiEnableScaleViewports
is enabled. - Backends: GLFW, SDL2, SDL3, Apple: provide
Platform_GetWindowFramebufferScale
handler. (#1065, #1542, #1676, #1786, #2826, #3757, #5081, #5580, #5592, #6465, #7273, #7779 etc.) - Backends: SDLGPU3 for SDL3: added multi-viewport support. (#8573) [@Lekoopapaul]
- Backends: SDL2, SDL3: revert updating monitors and work areas info every frame. Only do it on Windows to detect task-bar resize until we get an adequate event for it. (#8415, #8558)
- Backends: SDL3: macOS: Fixed secondary-viewports not appearing on a different monitor than the main viewport. Because
SDL_SetWindowParent()
seems to restrict it. - Backends: GLFW: Disable multi-viewports under Wayland (require GLFW 3.4). (#8587)
- Backends: GLFW: Fixed an issue where Win32 specific WndProc hook was not installed for all GLFW version, preventing mouse vs touch detection from working on secondary viewports.
Gallery
@AlubJ: "I'm using ImGui to write a modding tool for classic LEGO games (The Complete Saga, Indiana Jones 1 and Batman 1) called BactaTank Classic."
https://github.com/AlubJ/BactaTank-Classic
@immortalx74: "Dear ImGui spotted on the editor of the early access racing title Assetto Corsa EVO"
https://assettocorsa.gg/assetto-corsa-evo/
@basharast: "This was long term project I worked on for more than year (ImMobile),
started as an idea for legacy hardware to provide compatible (desktop + mobile os)-like environment, combining community projects and examples into one unified UI for standalone experience purpose." [...] "The project was mainly focus on touch support to understand how to resolve touch behavior (Details)")
(view & read more about ImMobile..)
MCUViewer - Simplifying Embedded Debugging
https://mcuviewer.com/
"Rediscover your embedded system"
"Profile interrupts with minimal overhead"
"Analyze high speed data on low cost targets"
video03.mp4
@native-m:
(continuation from #7503 (comment)) progress of my unfinished DAW (VST3 support, piano roll, many more)
@kingofknights: "This is my side HFT project"
Arthur
@Stewmath: "I rewrote my Zelda Oracles romhacking toolkit with imgui - I gotta say, compared to the old GUI that was using GTK, it's ridiculous how much easier this is to code with!"
Repo: https://github.com/Stewmath/LynnaLab
Video: https://www.youtube.com/watch?v=Y2MOVATt1VY
@tay10r: "A web UI for controlling my microscope!"
City of None from blog post "Making Video Games in 2025 (without an engine)"
https://noelberry.ca/posts/making_games_in_2025/
@brenocq: ImGui spotted in MrBeast's YouTube video "How We Make Our Deadly Traps" to visualize where bombs were planted."
From https://bsky.app/profile/echolevel.co.uk/post/3lq3a5rvsz22m
" A glimpse of my composing & mixing workflow in The Siege and The Sandfox. I tend to work at runtime with Metron Tracker & my mix system as DearImGui overlays. I can override gameplay mix events or test in place, tweak synth/sample instruments, adjust quantised sync offsets "
(actual game is visible at https://www.youtube.com/watch?v=4tVOqoYz5eQ)
A.glimpse.of.my.composing.mixing.workflow.in.3lq3a5rvsz22m.mp4
@reynarzz: _"My solo 3D/2D game engine."
@Ecksmas: "A middleware launcher I completed as a team lead and (junior) developer at a 6 month long internship. We originally inteded to build a lot of critical functionality our self such as authentication, server for the games to be downloaded e.t.c but with little to no experience with any of that we landed in integrating the Steam SDK instead. It has been a joy to work with ImGui and thank you to the community :)"
"The launcher is live and is shipped with ION Game Designs digital games."
Also see previous releases details.
Note that GitHub are now clamping release notes sometimes really badly, click on a header/title to read full notes.
β€οΈ Previous summer was the 10th anniversary of v1.00! Read: 10 years of Dear ImGui ! π
π° π Dear ImGui is funded by your contributions and absolutely needs them to sustain and grow. We can invoice and accommodate to many situations. If your company uses Dear ImGui, please reach out. See Funding page. Did you know? If you need an excuse to pay, you may buy licenses for Test Engine and buy hours of support (and cough not use them all) and that will contribute to fund Dear ImGui.