v1.70
版本发布时间: 2019-05-06 21:03:09
ocornut/imgui最新发布版本:v1.91.3(2024-10-04 21:48:34)
Hello!
In spite of the greaaat looking version number, this is a general release following 1.69, keeping with the rhythm of having more frequent, smaller releases. Reading the full changelog is a good way to keep up to date with the things dear imgui has to offer, and maybe will give you ideas of features that you've been ignoring until now!
See https://github.com/ocornut/imgui for the project homepage. See https://github.com/ocornut/imgui/releases for earlier release notes. See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions. Issues and support: https://github.com/ocornut/imgui/issues Technical support for new users: https://discourse.dearimgui.org (also search in GitHub Issues)
Thank you
Ongoing work on dear imgui is currently being sponsored by Blizzard Entertainment + general & community work by many individual users, hobbyists and studios. See the readme for details. Huge thank you to all of you, past and present supporters! You help is very meaningful.
TL;DR;
- Added
ImDrawCallback_ResetRenderState = -1
special ImDrawList callback value to request back-end renderer to reset its render state, in a standardized manner. - Layout: Added
SetNextItemWidth()
helper to avoid usingPushItemWidth()
/PopItemWidth()
for single items. - Popups: Closing a popup restores the focused/nav window in place at the time of the popup opening, instead of restoring the window that was in the window stack at the time of the OpenPopup call. (#2517).
- Examples: SDL: Support for SDL_GameController gamepads (enable with
ImGuiConfigFlags_NavEnableGamepad
). (#2509) [@DJLink] - Examples: Vulkan: Various fixes.
- Examples: Added GLFW+Metal and Emscripten examples.
- Examples: Renamed imgui_impl_freeglut to imgui_impl_glut.
- Many many other fixes, improvements, small additions. Read below!
Breaking Changes
- ImDrawList: Improved algorithm for mitre joints on thick lines, preserving correct thickness up to 90 degrees angles (e.g. rectangles). If you have custom rendering using thick lines, they will appear a little thicker now (about +30%). (#2518) [@rmitton]
- Obsoleted
GetContentRegionAvailWidth()
, useGetContentRegionAvail().x
instead! Kept inline redirection function. - Examples: Vulkan: imgui_impl_vulkan: Added
MinImageCount
/ImageCount
fields in ImGui_ImplVulkan_InitInfo, required during initialization to specify the number of in-flight image requested by swap chains. (was previously a hard#define IMGUI_VK_QUEUED_FRAMES 2
). (#2071, #1677) [@nathanvoglsam] - Examples: Vulkan: Tidying up the demo/internals helpers (most engine/app should not rely on them but it is possible you have!).
Other Changes:
- ImDrawList: Added
ImDrawCallback_ResetRenderState = -1
, a special ImDrawList::AddCallback() value to request the renderer back-end to reset its render state. (#2037, #1639, #2452). Added support for ImDrawCallback_ResetRenderState in all renderer back-ends. Each renderer code setting up initial render state has been moved to a function so it could be called at the start of rendering and when a ResetRenderState is requested. [@ocornut, @bear24rw] - InputText: Fixed selection background rendering one frame after the cursor movement when first transitioning from no-selection to has-selection. (Bug in 1.69) (#2436) [@Nazg-Gul]
- InputText: Work-around for buggy standard libraries where isprint('\t') returns true. (#2467, #1336)
- InputText: Fixed
ImGuiInputTextFlags_AllowTabInput
leading to two tabs characters being inserted if the back-end provided both Key and Character input. (#2467, #1336) - Layout: Added
SetNextItemWidth()
helper to avoid usingPushItemWidth()
/PopItemWidth()
for single items. Note that SetNextItemWidth() currently only affect the same subset of items as PushItemWidth(), generally referred to as the large framed+labeled items. Because the new SetNextItemWidth() function is explicit we may later extend its effect to more items. - Layout: Fixed
PushItemWidth(-width)
for right-side alignment laying out some items (button, listbox, etc.) with negative sizes if the 'width' argument was smaller than the available width at the time of item submission. - Window: Fixed window with the
ImGuiWindowFlags_AlwaysAutoResize
flag unnecessarily extending their hovering boundaries by a few pixels (this is used to facilitate resizing from borders when available for a given window). One of the noticeable minor side effect was that navigating menus would have had a tendency to disable highlight from parent menu items earlier than necessary while approaching the child menu. - Window: Close button is horizontally aligned with
style.FramePadding.x
. - Window: Fixed contents region being off by
WindowBorderSize
amount on the right when scrollbar is active. - Window: Fixed
SetNextWindowSizeConstraints()
with non-rounded positions making windows drift. (#2067, #2530) - Popups: Closing a popup restores the focused/nav window in place at the time of the popup opening, instead of restoring the window that was in the window stack at the time of the OpenPopup call. (#2517). Among other things, this allows opening a popup while no window are focused, and pressing Escape to clear the focus again.
- Popups: Fixed right-click from closing all popups instead of aiming at the hovered popup level (regression in 1.67).
- Selectable: With
ImGuiSelectableFlags_AllowDoubleClick
doesn't return true on the mouse button release following the double-click. Only first mouse release + second mouse down (double-click) returns true. Likewise for internal ButtonBehavior() with both _PressedOnClickRelease | _PressedOnDoubleClick. (#2503) - GetMouseDragDelta(): also returns the delta on the mouse button released frame. (#2419)
- GetMouseDragDelta(): verify that mouse positions are valid otherwise returns zero.
- Inputs: Support for horizontal scroll with Shift+Mouse Wheel. (#2424, #1463) [@LucaRood]
- PlotLines, PlotHistogram: Ignore NaN values when calculating min/max bounds. (#2485)
- Columns: Fixed boundary of clipping being off by 1 pixel within the left column. (#125)
- Separator: Declare its thickness (1.0f) to the layout, making items on both ends of a separator look more symmetrical.
- Combo, Slider, Scrollbar: Improve rendering in situation when there's only a few pixels available (<3 pixels).
- Nav: Fixed Drag/Slider functions going into text input mode when keyboard CTRL is held while pressing NavActivate.
- Drag and Drop: Fixed drag source with ImGuiDragDropFlags_SourceAllowNullID and null ID from receiving click regardless of being covered by another window (it didn't honor correct hovering rules). (#2521)
- ImDrawList: Improved algorithm for mitre joints on thick lines, preserving correct thickness up to 90 degrees angles, also faster to output. (#2518) [@rmitton]
- Misc: Added
IM_MALLOC()
/IM_FREE()
macros mimicking IM_NEW/IM_DELETE so user doesn't need to revert to using the ImGui::MemAlloc()/MemFree() calls directly. - Misc: Made
IMGUI_CHECKVERSION()
macro also check for matching size of ImDrawIdx. - Metrics: Added "Show windows rectangles" tool to visualize the different rectangles.
- Demo: Improved trees in columns demo.
- Examples: OpenGL: Added a dummy GL call + comments in
ImGui_ImplOpenGL3_Init()
to detect uninitialized GL function loaders early, and help users understand what they are missing. (#2421) - Examples: SDL: Added support for SDL_GameController gamepads (enable with ImGuiConfigFlags_NavEnableGamepad). (#2509) [@DJLink]
- Examples: Emscripten: Added Emscripten+SDL+GLES2 example. (#2494, #2492, #2351, #336) [@nicolasnoble, @redblobgames]
- Examples: Metal: Added Glfw+Metal example. (#2527) [@bear24rw]
- Examples: OpenGL3: Minor tweaks + not calling glBindBuffer more than necessary in the render loop.
- Examples: Vulkan: Fixed in-flight buffers issues when using multi-viewports. (#2461, #2348, #2378, #2097)
- Examples: Vulkan: Added missing support for 32-bit indices (#define ImDrawIdx unsigned int).
- Examples: Vulkan: Avoid passing negative coordinates to
vkCmdSetScissor
, which debug validation layers do not like. - Examples: Vulkan: Added
ImGui_ImplVulkan_SetMinImageCount()
to change min image count at runtime. (#2071) [@nathanvoglsam] - Examples: DirectX9: Fixed erroneous assert in
ImGui_ImplDX9_InvalidateDeviceObjects()
. (#2454) - Examples: DirectX10/11/12, Allegro, Marmalade: Render functions early out when display size is zero (minimized). (#2496)
- Examples: GLUT: Fixed existing FreeGLUT example to work with regular GLUT. (#2465) [@andrewwillmott]
- Examples: GLUT: Renamed imgui_impl_freeglut.cpp/.h to imgui_impl_glut.cpp/.h. (#2465) [@andrewwillmott]
- Examples: GLUT: Made
io.DeltaTime
always > 0. (#2430) - Examples: Visual Studio: Updated default platform toolset+sdk in vcproj files from v100+sdk7 (vs2010) to v110+sdk8 (vs2012). This is mostly so we can remove reliance on DXSDK_DIR for the DX10/DX11 example, which if existing and when switching to recent SDK ends up conflicting and creating warnings.
Beta features!
The docking (#2109) and multi-viewport (#1542) features are available in the docking
branch, they are in beta but actively maintained and being used by many teams already. Your continuous feedback is always appreciated. There's a CMake pull-request (#1713).
Help wanted!
- Multi-viewports in particular needs help on Linux and Mac, and specific workarounds for both SDL and GLFW are becoming highly desirable. (#2117),
- The Vulkan renderer appears to have issues (see vulkan tag)
- The DirectX12 renderer needs multi-viewports support.
- Browsing issues and todo list you may find something something to contribute to!
Gallery
See Gallery threads for more pictures and to post yours!
Student showcase: DigiPen Singapore 2019 End of Spring. "All custom engines are done from scratch for 2 semesters of 13 weeks each. Plus of course an additional 5 other modules per semester. ImGui is one of the few libraries that they are allowed to use. Please check the Game Gallery if you wish to play some of these games. Click Here"
"Year 2 (GAM200/250) These two modules are about creating 2D Games. Teams are usually 5 to 6 people."
"Year 3 (GAM300/350) Here students do 3D Games. These teams are about 8 to 10 people. Here we restrict which libraries they can use even more. Linear Color pipelines, Shadows, HDR, PBR, etc for graphics."
See many more screenshots from DigiPen Singapore 2019 students: https://github.com/ocornut/imgui/issues/2265#issuecomment-483989202
Student showcase: DigiPen Bilbao Junior Students
More screenshots from DigiPen Bilbao students: https://github.com/ocornut/imgui/issues/2265#issuecomment-487540754
Atlas 64k Graphics Breakdown - Demoscene Stream (2019/05/01) https://www.youtube.com/watch?v=Y3d8jR_IwYw / http://www.pouet.net/prod.php?which=80996
Fork of ImGui designed to look more like Adobe's Spectrum (https://github.com/adobe/imgui) See details
Single Header Hotkey editor by @CedricGuillemet (https://github.com/CedricGuillemet/ImHotKey)
LIONant's Property System by @TomasArce (https://gitlab.com/LIONant/properties)