diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp
index c4dce23..3cd6608 100644
--- a/examples/example_glfw_opengl3/main.cpp
+++ b/examples/example_glfw_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
static void glfw_error_callback(int error, const char* description)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp
index c4dce23..3cd6608 100644
--- a/examples/example_glfw_opengl3/main.cpp
+++ b/examples/example_glfw_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
static void glfw_error_callback(int error, const char* description)
diff --git a/examples/example_glfw_vulkan/CMakeLists.txt b/examples/example_glfw_vulkan/CMakeLists.txt
index f9adc77..60fe571 100644
--- a/examples/example_glfw_vulkan/CMakeLists.txt
+++ b/examples/example_glfw_vulkan/CMakeLists.txt
@@ -20,7 +20,7 @@
# ImGui
set(IMGUI_DIR ../../)
-include_directories(${IMGUI_DIR})
+include_directories(${IMGUI_DIR} ..)
# Libraries
find_library(VULKAN_LIBRARY
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp
index c4dce23..3cd6608 100644
--- a/examples/example_glfw_opengl3/main.cpp
+++ b/examples/example_glfw_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
static void glfw_error_callback(int error, const char* description)
diff --git a/examples/example_glfw_vulkan/CMakeLists.txt b/examples/example_glfw_vulkan/CMakeLists.txt
index f9adc77..60fe571 100644
--- a/examples/example_glfw_vulkan/CMakeLists.txt
+++ b/examples/example_glfw_vulkan/CMakeLists.txt
@@ -20,7 +20,7 @@
# ImGui
set(IMGUI_DIR ../../)
-include_directories(${IMGUI_DIR})
+include_directories(${IMGUI_DIR} ..)
# Libraries
find_library(VULKAN_LIBRARY
diff --git a/examples/example_glfw_vulkan/main.cpp b/examples/example_glfw_vulkan/main.cpp
index 600c82d..8c5d995 100644
--- a/examples/example_glfw_vulkan/main.cpp
+++ b/examples/example_glfw_vulkan/main.cpp
@@ -261,7 +261,7 @@
}
// Record Imgui Draw Data and draw funcs into command buffer
- ImGui_ImplVulkan_RenderDrawData(fd->CommandBuffer, ImGui::GetDrawData());
+ ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), fd->CommandBuffer);
// Submit command buffer
vkCmdEndRenderPass(fd->CommandBuffer);
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp
index c4dce23..3cd6608 100644
--- a/examples/example_glfw_opengl3/main.cpp
+++ b/examples/example_glfw_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
static void glfw_error_callback(int error, const char* description)
diff --git a/examples/example_glfw_vulkan/CMakeLists.txt b/examples/example_glfw_vulkan/CMakeLists.txt
index f9adc77..60fe571 100644
--- a/examples/example_glfw_vulkan/CMakeLists.txt
+++ b/examples/example_glfw_vulkan/CMakeLists.txt
@@ -20,7 +20,7 @@
# ImGui
set(IMGUI_DIR ../../)
-include_directories(${IMGUI_DIR})
+include_directories(${IMGUI_DIR} ..)
# Libraries
find_library(VULKAN_LIBRARY
diff --git a/examples/example_glfw_vulkan/main.cpp b/examples/example_glfw_vulkan/main.cpp
index 600c82d..8c5d995 100644
--- a/examples/example_glfw_vulkan/main.cpp
+++ b/examples/example_glfw_vulkan/main.cpp
@@ -261,7 +261,7 @@
}
// Record Imgui Draw Data and draw funcs into command buffer
- ImGui_ImplVulkan_RenderDrawData(fd->CommandBuffer, ImGui::GetDrawData());
+ ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), fd->CommandBuffer);
// Submit command buffer
vkCmdEndRenderPass(fd->CommandBuffer);
diff --git a/examples/example_sdl_opengl2/Makefile b/examples/example_sdl_opengl2/Makefile
index a295ac2..1872d7c 100644
--- a/examples/example_sdl_opengl2/Makefile
+++ b/examples/example_sdl_opengl2/Makefile
@@ -26,7 +26,7 @@
ECHO_MESSAGE = "Linux"
LIBS = -lGL -ldl `sdl2-config --libs`
- CXXFLAGS = -I../../ `sdl2-config --cflags`
+ CXXFLAGS = -I ../ -I../../ `sdl2-config --cflags`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
@@ -35,7 +35,7 @@
ECHO_MESSAGE = "Mac OS X"
LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
- CXXFLAGS = -I../../ -I/usr/local/include `sdl2-config --cflags`
+ CXXFLAGS = -I ../ -I../../ -I/usr/local/include `sdl2-config --cflags`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
@@ -44,7 +44,7 @@
ECHO_MESSAGE = "Windows"
LIBS = -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
- CXXFLAGS = -I../../ `pkg-config --cflags sdl2`
+ CXXFLAGS = -I ../ -I../../ `pkg-config --cflags sdl2`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp
index c4dce23..3cd6608 100644
--- a/examples/example_glfw_opengl3/main.cpp
+++ b/examples/example_glfw_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
static void glfw_error_callback(int error, const char* description)
diff --git a/examples/example_glfw_vulkan/CMakeLists.txt b/examples/example_glfw_vulkan/CMakeLists.txt
index f9adc77..60fe571 100644
--- a/examples/example_glfw_vulkan/CMakeLists.txt
+++ b/examples/example_glfw_vulkan/CMakeLists.txt
@@ -20,7 +20,7 @@
# ImGui
set(IMGUI_DIR ../../)
-include_directories(${IMGUI_DIR})
+include_directories(${IMGUI_DIR} ..)
# Libraries
find_library(VULKAN_LIBRARY
diff --git a/examples/example_glfw_vulkan/main.cpp b/examples/example_glfw_vulkan/main.cpp
index 600c82d..8c5d995 100644
--- a/examples/example_glfw_vulkan/main.cpp
+++ b/examples/example_glfw_vulkan/main.cpp
@@ -261,7 +261,7 @@
}
// Record Imgui Draw Data and draw funcs into command buffer
- ImGui_ImplVulkan_RenderDrawData(fd->CommandBuffer, ImGui::GetDrawData());
+ ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), fd->CommandBuffer);
// Submit command buffer
vkCmdEndRenderPass(fd->CommandBuffer);
diff --git a/examples/example_sdl_opengl2/Makefile b/examples/example_sdl_opengl2/Makefile
index a295ac2..1872d7c 100644
--- a/examples/example_sdl_opengl2/Makefile
+++ b/examples/example_sdl_opengl2/Makefile
@@ -26,7 +26,7 @@
ECHO_MESSAGE = "Linux"
LIBS = -lGL -ldl `sdl2-config --libs`
- CXXFLAGS = -I../../ `sdl2-config --cflags`
+ CXXFLAGS = -I ../ -I../../ `sdl2-config --cflags`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
@@ -35,7 +35,7 @@
ECHO_MESSAGE = "Mac OS X"
LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
- CXXFLAGS = -I../../ -I/usr/local/include `sdl2-config --cflags`
+ CXXFLAGS = -I ../ -I../../ -I/usr/local/include `sdl2-config --cflags`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
@@ -44,7 +44,7 @@
ECHO_MESSAGE = "Windows"
LIBS = -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
- CXXFLAGS = -I../../ `pkg-config --cflags sdl2`
+ CXXFLAGS = -I ../ -I../../ `pkg-config --cflags sdl2`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
diff --git a/examples/example_sdl_opengl3/main.cpp b/examples/example_sdl_opengl3/main.cpp
index 57cd0ad..ac20643 100644
--- a/examples/example_sdl_opengl3/main.cpp
+++ b/examples/example_sdl_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_sdl.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
int main(int, char**)
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 4c87047..664c564 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -30,16 +30,30 @@
-----------------------------------------------------------------------
- VERSION 1.62 WIP (IN PROGRESS)
+ VERSION 1.63 WIP (IN PROGRESS)
+-----------------------------------------------------------------------
+
+Other Changes:
+
+ - ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+ - ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+ - Window: Allow menu windows from ignoring the style.WindowMinSize values so short menus are not padded. (#1909)
+ - Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+ - Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+ - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+ - Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
-----------------------------------------------------------------------
Breaking Changes:
- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
- The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen. In which case
- you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
- - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish other variants and discourage using the full set. (#1859)
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+ - ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
Other Changes:
@@ -57,27 +71,38 @@
so you may study or grab one half of the code and not the other.
- This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
- easy update path to support multi-viewports later.
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
- This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
expect to have to reshuffle a few things.
- Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
- Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
- - Please read examples/README.txt for details.
- - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+ - Read examples/README.txt for details.
+ - Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+ - Added IsItemDeactivatedAfterChange() if the last item was active previously, isn't anymore, and during its active state modified a value.
+ Note that you may still get false positive (e.g. drag value and while holding return on the same value). (#820, #956, #1875)
- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
- - TreeNode: Fixed nodes with ImGuiTreeNodeFlags_Leaf flag always returning true which was meaningless.
+ - Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
- - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not fully close/re-open the popup so its child popups won't get closed. (#1497, #1533, #1865).
+ - Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
- - InputText(): Fixed Undo after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+ - InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+ - Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+ - Examples: SDL+Vulkan: Added SDL+Vulkan example.
+ - Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+ - Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+ - Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+ - Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+ - Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+ - Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+ - Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
@@ -456,6 +481,7 @@
- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
@@ -484,13 +510,14 @@
- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
-- Windows: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
-- Windows: Fixed title bar color of top-most window under a modal window.
-- Windows: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
-- Windows: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
-- Windows: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
-- Windows: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
-- Windows: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
diff --git a/README.md b/README.md
index 693827f..953d5ad 100644
--- a/README.md
+++ b/README.md
@@ -108,30 +108,31 @@
_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
Languages: (third-party bindings)
-- C: [cimgui](https://github.com/Extrawurst/cimgui)
+- C: [cimgui](https://github.com/Extrawurst/cimgui) or [sonoro1234's cimgui](https://github.com/sonoro1234/cimgui) (more recent update), also see [#1879](https://github.com/ocornut/imgui/issues/1879)
- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
- Go: [go-imgui](https://github.com/Armored-Dragon/go-imgui)
- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
-- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
- Lua: [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
Frameworks:
-- DirectX 9, DirectX 10, DirectX 11, DirectX 12: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- OpenGL 2/3 (with GLFW or SDL): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Vulkan (with GLFW): [examples/](https://github.com/ocornut/imgui/tree/master/examples)
-- Allegro 5, iOS, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx)
- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
-- Unmerged PR: FreeGlut + OpenGL2: [#801](https://github.com/ocornut/imgui/pull/801)
- Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281)
- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [issue #551](https://github.com/ocornut/imgui/issues/551)
- Flexium/SFML: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
@@ -140,7 +141,7 @@
- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
-- LÖVE: [love-imgui](https://github.com/slages/love-imgui)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d)
@@ -148,7 +149,7 @@
- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
-For other bindings: see [this page](https://github.com/ocornut/imgui/wiki/Links/). Also see [wiki](https://github.com/ocornut/imgui/wiki) for a few other links and ideas. Contact me if you would like to add to those lists.
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
Roadmap
-------
@@ -210,7 +211,7 @@
- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
-See the [Links page](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to different languages and frameworks.
+See the [Wiki](https://github.com/ocornut/imgui/wiki) and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
Frequently Asked Question (FAQ)
-------------------------------
@@ -272,7 +273,7 @@
Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
-There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Links](https://github.com/ocornut/imgui/wiki/Links) for third-party bindings to other languages.
+There is an reasonably maintained [c-api for ImGui](https://github.com/Extrawurst/cimgui) by Stephan Dilly designed for binding in other languages. I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
Support dear imgui
------------------
@@ -315,10 +316,10 @@
- DotEmu
Salty caramel supporters:
-- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru.
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Supercell.
Caramel supporters:
-- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey.
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Jeff Roberts, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki.
And other supporters; thanks!
(Please contact me or PR if you would like to be added or removed from this list)
diff --git a/TODO.txt b/TODO.txt
index e10b341..513341e 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -285,7 +285,6 @@
- misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
- backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
- - backend: freeglut (#801, #795)
- web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
- web/emscriptem: tweak OpenGL renderers to support OpenGL ES. (#1713, #336)
- web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
diff --git a/examples/.gitignore b/examples/.gitignore
index e21b514..9ce332b 100644
--- a/examples/.gitignore
+++ b/examples/.gitignore
@@ -6,21 +6,26 @@
*.opensdf
*.sdf
*.suo
-*.vcxproj.user
+*.user
*.o
*.obj
+*.exe
+*.log
*.pdb
*.ilk
*.VC.db
*.VC.VC.opendb
-## XCode cruft
+## Xcode cruft
.DS_Store
project.xcworkspace
xcuserdata
-## Executables
-*.exe
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
example_glfw_opengl2/example_glfw_opengl2
example_glfw_opengl3/example_glfw_opengl3
example_sdl_opengl2/example_sdl_opengl2
diff --git a/examples/README.txt b/examples/README.txt
index 2dce98d..a7c7e22 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -32,20 +32,14 @@
MISC COMMENTS AND SUGGESTIONS
---------------------------------------
- - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
-
- - Please read the comments and instruction at the top of each file.
-
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
- If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
catch up with what changed.
- - To LEARN how to setup imgui, you may refer to 'example_glfw_opengl2/' because is the simplest one to read.
- However, do NOT USE the OpenGL2 renderer if your code is using any modern GL3+ calls.
- Mixing old fixed-pipeline OpenGL2 and modern OpenGL3+ is going to make everything more complicated.
- Read comments below for details. If you are not sure, in doubt, use the OpenGL3 renderer.
-
- Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
@@ -54,8 +48,8 @@
at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
cursor only when an interactive drag is in progress.
Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
- If you are not sure who to blame if you feeling that dragging something is laggy, try to build an
- application drawing a shape directly under the mouse cursor.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
---------------------------------------
@@ -82,8 +76,8 @@
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
- Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering system
- layered over DirectX11.
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
using your own functions, etc.
@@ -102,38 +96,39 @@
integration. It is also much more complicated and require more work to integrate correctly.
If you are new to imgui and you are trying to integrate it into your application, first try to ignore
everything related to Viewport and Platform Windows. You'll be able to come back to it later!
- Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
- improvements and fixes related to viewports and platform windows without extra work on your side.
+ Note that if you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit
+ from improvements and fixes related to viewports and platform windows without extra work on your side.
See 'ImGuiPlatformIO' for details.
-List of officially maintained Platforms Bindings:
+List of Platforms Bindings in this repository:
- imgui_impl_glfw.cpp
- imgui_impl_osx.mm
- imgui_impl_sdl.cpp
- imgui_impl_win32.cpp
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Windows native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
-List of officially maintained Renderer Bindings:
+List of Renderer Bindings in this repository:
- imgui_impl_dx9.cpp
- imgui_impl_dx10.cpp
- imgui_impl_dx11.cpp
- imgui_impl_dx12.cpp
- imgui_impl_opengl2.cpp
- imgui_impl_opengl3.cpp
- imgui_impl_vulkan.cpp
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
-List of officially maintained high-level Frameworks Bindings (combine Platform + Renderer)
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
-Third-party framework, graphics API and languages bindings:
+Third-party framework, graphics API and languages bindings are listed at:
- https://github.com/ocornut/imgui/wiki/Links
+ https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
- Frameworks: FreeGlut, Cinder, Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
@@ -228,6 +223,10 @@
Allegro 5 example.
= main.cpp + imgui_impl_allegro5.cpp
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
example_marmalade/
Marmalade example using IwGx.
= main.cpp + imgui_impl_marmalade.cpp
diff --git a/examples/example_allegro5/README.md b/examples/example_allegro5/README.md
index 783839d..5fdcc50 100644
--- a/examples/example_allegro5/README.md
+++ b/examples/example_allegro5/README.md
@@ -12,12 +12,12 @@
- On Ubuntu 14.04+
```bash
-g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
```
- On Windows with Visual Studio's CLI
```
set ALLEGRODIR=path_to_your_allegro5_folder
-cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
```
diff --git a/examples/example_allegro5/example_allegro5.vcxproj b/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 0000000..ec96f62
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_allegro5/example_allegro5.vcxproj.filters b/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 0000000..09dbc5e
--- /dev/null
+++ b/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,52 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_apple/imguiex.xcodeproj/project.pbxproj b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
index 3e5b078..c41ba35 100644
--- a/examples/example_apple/imguiex.xcodeproj/project.pbxproj
+++ b/examples/example_apple/imguiex.xcodeproj/project.pbxproj
@@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */; };
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */; };
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DB0B3020E3768400FF57F1 /* main.cpp */; };
197E1E871B8943FE00E3FE6A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */; };
197E1E891B89443600E3FE6A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F221CB39FB50090F036 /* AppDelegate.m */; };
@@ -16,8 +19,6 @@
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 197E1E881B89443600E3FE6A /* imgui_demo.cpp */; };
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5891B2E6A5500C130BA /* debug_hud.cpp */; };
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F391CB3A1B20090F036 /* main.cpp */; };
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */; };
1A1A0F4E1CB3C54D0090F036 /* libglfw.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */; };
6D1E39171B35EEF10017B40F /* uSynergy.c in Sources */ = {isa = PBXBuildFile; fileRef = 6D1E39151B35EEF10017B40F /* uSynergy.c */; };
6D2FC55A1B2E632000C130BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2FC5591B2E632000C130BA /* main.m */; };
@@ -36,6 +37,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_glfw.h; path = ../../imgui_impl_glfw.h; sourceTree = ""; };
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../../imgui_impl_opengl2.h; sourceTree = ""; };
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_glfw.cpp; path = ../../imgui_impl_glfw.cpp; sourceTree = ""; };
+ 07DB0B3020E3768400FF57F1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../../example_glfw_opengl2/main.cpp; sourceTree = ""; };
197E1E861B8943FE00E3FE6A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
197E1E881B89443600E3FE6A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../../imgui_demo.cpp; sourceTree = ""; };
1A1A0F1F1CB39FB50090F036 /* imguiex-osx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "imguiex-osx.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -43,9 +49,6 @@
1A1A0F221CB39FB50090F036 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
1A1A0F271CB39FB50090F036 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
1A1A0F2C1CB39FB50090F036 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_impl_glfw_gl2.cpp; sourceTree = ""; };
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = imgui_impl_glfw_gl2.h; sourceTree = ""; };
- 1A1A0F391CB3A1B20090F036 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; };
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libglfw.dylib; path = /usr/local/lib/libglfw.dylib; sourceTree = ""; };
6D1E39151B35EEF10017B40F /* uSynergy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = uSynergy.c; sourceTree = ""; };
6D1E39161B35EEF10017B40F /* uSynergy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uSynergy.h; sourceTree = ""; };
@@ -93,11 +96,23 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */ = {
+ isa = PBXGroup;
+ children = (
+ 07DB0B3020E3768400FF57F1 /* main.cpp */,
+ 07DB0B2D20E3767000FF57F1 /* imgui_impl_glfw.cpp */,
+ 07DB0B2A20E3767000FF57F1 /* imgui_impl_glfw.h */,
+ 07DB0B2B20E3767000FF57F1 /* imgui_impl_opengl2.cpp */,
+ 07DB0B2C20E3767000FF57F1 /* imgui_impl_opengl2.h */,
+ );
+ name = example_glfw_gl2;
+ sourceTree = "";
+ };
1A1A0F201CB39FB50090F036 /* imguiex-osx */ = {
isa = PBXGroup;
children = (
+ 07DB0B2920E3762C00FF57F1 /* example_glfw_gl2 */,
1A1A0F4D1CB3C54D0090F036 /* libglfw.dylib */,
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */,
1A1A0F211CB39FB50090F036 /* AppDelegate.h */,
1A1A0F221CB39FB50090F036 /* AppDelegate.m */,
1A1A0F271CB39FB50090F036 /* Assets.xcassets */,
@@ -114,17 +129,6 @@
name = "Supporting Files";
sourceTree = "";
};
- 1A1A0F351CB3A1B20090F036 /* opengl2_example */ = {
- isa = PBXGroup;
- children = (
- 1A1A0F371CB3A1B20090F036 /* imgui_impl_glfw_gl2.cpp */,
- 1A1A0F381CB3A1B20090F036 /* imgui_impl_glfw_gl2.h */,
- 1A1A0F391CB3A1B20090F036 /* main.cpp */,
- );
- name = opengl2_example;
- path = ../../opengl2_example;
- sourceTree = "";
- };
6D1E39141B35EEF10017B40F /* usynergy */ = {
isa = PBXGroup;
children = (
@@ -302,12 +306,13 @@
files = (
1A1A0F301CB3A0DA0090F036 /* imgui_draw.cpp in Sources */,
1A1A0F311CB3A0DA0090F036 /* imgui.cpp in Sources */,
+ 07DB0B3120E3768400FF57F1 /* main.cpp in Sources */,
1A1A0F331CB3A0E10090F036 /* imgui_demo.cpp in Sources */,
1A1A0F341CB3A0EC0090F036 /* debug_hud.cpp in Sources */,
- 1A1A0F481CB3A2E50090F036 /* main.cpp in Sources */,
+ 07DB0B2E20E3767000FF57F1 /* imgui_impl_opengl2.cpp in Sources */,
1A1A0F321CB3A0DE0090F036 /* uSynergy.c in Sources */,
1A1A0F231CB39FB50090F036 /* AppDelegate.m in Sources */,
- 1A1A0F4A1CB3A5070090F036 /* imgui_impl_glfw_gl2.cpp in Sources */,
+ 07DB0B2F20E3767000FF57F1 /* imgui_impl_glfw.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 0000000..0c60ba3
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 0000000..b459194
--- /dev/null
+++ b/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/examples/example_freeglut_opengl2/main.cpp b/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 0000000..b5f2b99
--- /dev/null
+++ b/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,133 @@
+// ImGui - standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show a simple window.
+ // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+ ImGui::Text("Hello, world!"); // Display some text (you can use a format string too)
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our windows open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ }
+
+ // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window);
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+ if (show_demo_window)
+ {
+ ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+ ImGui::ShowDemoWindow(&show_demo_window);
+ }
+}
+
+void glut_display_func()
+{
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ ImGui::Render();
+
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/examples/example_glfw_opengl3/build_win32.bat b/examples/example_glfw_opengl3/build_win32.bat
index 8b54aff..e5c15c5 100644
--- a/examples/example_glfw_opengl3/build_win32.bat
+++ b/examples/example_glfw_opengl3/build_win32.bat
@@ -1,3 +1,3 @@
@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
mkdir Debug
-cl /nologo /Zi /MD /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/examples/example_glfw_opengl3/main.cpp b/examples/example_glfw_opengl3/main.cpp
index c4dce23..3cd6608 100644
--- a/examples/example_glfw_opengl3/main.cpp
+++ b/examples/example_glfw_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_glfw.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include // This example is using gl3w to access OpenGL functions. You may freely use any other OpenGL loader such as: glew, glad, glLoadGen, etc.
+//#include
#include
static void glfw_error_callback(int error, const char* description)
diff --git a/examples/example_glfw_vulkan/CMakeLists.txt b/examples/example_glfw_vulkan/CMakeLists.txt
index f9adc77..60fe571 100644
--- a/examples/example_glfw_vulkan/CMakeLists.txt
+++ b/examples/example_glfw_vulkan/CMakeLists.txt
@@ -20,7 +20,7 @@
# ImGui
set(IMGUI_DIR ../../)
-include_directories(${IMGUI_DIR})
+include_directories(${IMGUI_DIR} ..)
# Libraries
find_library(VULKAN_LIBRARY
diff --git a/examples/example_glfw_vulkan/main.cpp b/examples/example_glfw_vulkan/main.cpp
index 600c82d..8c5d995 100644
--- a/examples/example_glfw_vulkan/main.cpp
+++ b/examples/example_glfw_vulkan/main.cpp
@@ -261,7 +261,7 @@
}
// Record Imgui Draw Data and draw funcs into command buffer
- ImGui_ImplVulkan_RenderDrawData(fd->CommandBuffer, ImGui::GetDrawData());
+ ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), fd->CommandBuffer);
// Submit command buffer
vkCmdEndRenderPass(fd->CommandBuffer);
diff --git a/examples/example_sdl_opengl2/Makefile b/examples/example_sdl_opengl2/Makefile
index a295ac2..1872d7c 100644
--- a/examples/example_sdl_opengl2/Makefile
+++ b/examples/example_sdl_opengl2/Makefile
@@ -26,7 +26,7 @@
ECHO_MESSAGE = "Linux"
LIBS = -lGL -ldl `sdl2-config --libs`
- CXXFLAGS = -I../../ `sdl2-config --cflags`
+ CXXFLAGS = -I ../ -I../../ `sdl2-config --cflags`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
@@ -35,7 +35,7 @@
ECHO_MESSAGE = "Mac OS X"
LIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo `sdl2-config --libs`
- CXXFLAGS = -I../../ -I/usr/local/include `sdl2-config --cflags`
+ CXXFLAGS = -I ../ -I../../ -I/usr/local/include `sdl2-config --cflags`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
@@ -44,7 +44,7 @@
ECHO_MESSAGE = "Windows"
LIBS = -lgdi32 -lopengl32 -limm32 `pkg-config --static --libs sdl2`
- CXXFLAGS = -I../../ `pkg-config --cflags sdl2`
+ CXXFLAGS = -I ../ -I../../ `pkg-config --cflags sdl2`
CXXFLAGS += -Wall -Wformat
CFLAGS = $(CXXFLAGS)
endif
diff --git a/examples/example_sdl_opengl3/main.cpp b/examples/example_sdl_opengl3/main.cpp
index 57cd0ad..ac20643 100644
--- a/examples/example_sdl_opengl3/main.cpp
+++ b/examples/example_sdl_opengl3/main.cpp
@@ -7,7 +7,8 @@
#include "imgui_impl_sdl.h"
#include "imgui_impl_opengl3.h"
#include
-#include // This example is using gl3w to access OpenGL functions (because it is small). You may use glew/glad/glLoadGen/etc. whatever already works for you.
+#include