Skip to content

Commit 582aae9

Browse files
committed
Update internal copy ImGui to 1.84 (WIP) (3512f2c2c283ec86) (#107)
Internal copy has two PR's merged: https://github.com/thedmd/imgui/tree/feature/layout - used in blueprints example only https://github.com/thedmd/imgui/tree/feature/extra-keys - optional: used by Node Editor if present
1 parent 6253926 commit 582aae9

13 files changed

+4746
-2714
lines changed

docs/CHANGELOG.txt

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ v0.9.1 (WIP):
2222
CHANGE: Make Node Editor forward compatible with ImGui 1.80+ (#112)
2323
We're keeping backward compatibility with pre 1.8x versions.
2424

25+
CHANGE: Update internal copy ImGui to 1.84 (WIP) (3512f2c2c283ec86) (#107)
26+
Internal copy has two PR's merged:
27+
https://github.com/thedmd/imgui/tree/feature/layout - used in blueprints example only
28+
https://github.com/thedmd/imgui/tree/feature/extra-keys - optional: used by Node Editor if present
29+
2530
NEW: All source components are now versioned
2631

2732
NEW: Make view state independent of window resolution.

docs/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Please report issues or questions if something isn't clear.
5858
* https://github.com/thedmd/imgui/tree/feature/layout (used in blueprints sample only)
5959

6060
### Optional extension you can pull into your local copy of ImGui node editor can take advantage of:
61-
* https://github.com/thedmd/imgui/tree/feature/draw-list-fringe-scale (for sharp rendering, while zooming)
61+
* ~~https://github.com/thedmd/imgui/tree/feature/draw-list-fringe-scale (for sharp rendering, while zooming)~~ It is part of ImGui since 1.80 release
6262
* https://github.com/thedmd/imgui/tree/feature/extra-keys (for extra shortcuts)
6363

6464
## Building / Installing
@@ -139,7 +139,7 @@ struct Example:
139139
ed::End();
140140
ed::SetCurrentEditor(nullptr);
141141

142-
//ImGui::ShowMetricsWindow();
142+
//ImGui::ShowMetricsWindow();
143143
}
144144

145145
ed::EditorContext* m_Context = nullptr;

external/imgui/imconfig.h

+29-15
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
// Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure.
44
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
55
//-----------------------------------------------------------------------------
6-
// A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/branch with your modifications to imconfig.h)
7-
// B) or add configuration directives in your own file and compile with #define IMGUI_USER_CONFIG "myfilename.h"
8-
// If you do so you need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include
9-
// the imgui*.cpp files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures.
6+
// A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it)
7+
// B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template.
8+
//-----------------------------------------------------------------------------
9+
// You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp
10+
// files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures.
1011
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
1112
// Call IMGUI_CHECKVERSION() from your .cpp files to verify that the data structures your files are using are matching the ones imgui.cpp is using.
1213
//-----------------------------------------------------------------------------
@@ -19,7 +20,9 @@
1920
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
2021

2122
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
22-
// Using dear imgui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
23+
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
24+
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
25+
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
2326
//#define IMGUI_API __declspec( dllexport )
2427
//#define IMGUI_API __declspec( dllimport )
2528

@@ -30,38 +33,49 @@
3033
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
3134
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
3235
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
33-
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable debug/metrics window: ShowMetricsWindow() will be empty.
36+
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty.
3437

3538
//---- Don't implement some functions to reduce linkage requirements.
36-
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc.
37-
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] Don't implement default IME handler. Won't use and link with ImmGetContext/ImmSetCompositionWindow.
39+
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
40+
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] Don't implement default IME handler. Won't use and link with ImmGetContext/ImmSetCompositionWindow. (imm32.lib/.a)
3841
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, ime).
3942
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
4043
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
4144
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
42-
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
45+
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
46+
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
4347
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
48+
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available
4449

4550
//---- Include imgui_user.h at the end of imgui.h as a convenience
4651
//#define IMGUI_INCLUDE_IMGUI_USER_H
4752

4853
//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
4954
//#define IMGUI_USE_BGRA_PACKED_COLOR
5055

51-
//---- Use 32-bit for ImWchar (default is 16-bit) to support full unicode code points.
56+
//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
5257
//#define IMGUI_USE_WCHAR32
5358

5459
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
55-
// By default the embedded implementations are declared static and not available outside of imgui cpp files.
60+
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
5661
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
5762
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
5863
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
5964
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
6065

61-
//---- Unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined, use the much faster STB sprintf library implementation of vsnprintf instead of the one from the default C library.
62-
// Note that stb_sprintf.h is meant to be provided by the user and available in the include path at compile time. Also, the compatibility checks of the arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by STB sprintf.
66+
//---- Use stb_printf's faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
67+
// Requires 'stb_sprintf.h' to be available in the include path. Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by STB sprintf.
6368
// #define IMGUI_USE_STB_SPRINTF
6469

70+
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
71+
// Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
72+
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
73+
//#define IMGUI_ENABLE_FREETYPE
74+
75+
//---- Use stb_truetype to build and rasterize the font atlas (default)
76+
// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend.
77+
//#define IMGUI_ENABLE_STB_TRUETYPE
78+
6579
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
6680
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
6781
/*
@@ -75,12 +89,12 @@
7589
*/
7690

7791
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
78-
// Your renderer back-end will need to support it (most example renderer back-ends support both 16/32-bit indices).
92+
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
7993
// Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
8094
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
8195
//#define ImDrawIdx unsigned int
8296

83-
//---- Override ImDrawCallback signature (will need to modify renderer back-ends accordingly)
97+
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
8498
//struct ImDrawList;
8599
//struct ImDrawCmd;
86100
//typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data);

0 commit comments

Comments
 (0)