|
3 | 3 | // Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure. |
4 | 4 | // You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions. |
5 | 5 | //----------------------------------------------------------------------------- |
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. |
10 | 11 | // Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts. |
11 | 12 | // 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. |
12 | 13 | //----------------------------------------------------------------------------- |
|
30 | 31 | // It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp. |
31 | 32 | //#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty. |
32 | 33 | //#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. |
| 34 | +//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty. |
34 | 35 |
|
35 | 36 | //---- Don't implement some functions to reduce linkage requirements. |
36 | 37 | //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. |
|
48 | 49 | //---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another) |
49 | 50 | //#define IMGUI_USE_BGRA_PACKED_COLOR |
50 | 51 |
|
51 | | -//---- Use 32-bit for ImWchar (default is 16-bit) to support full unicode code points. |
| 52 | +//---- 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...) |
52 | 53 | //#define IMGUI_USE_WCHAR32 |
53 | 54 |
|
54 | 55 | //---- 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. |
| 56 | +// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files. |
56 | 57 | //#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h" |
57 | 58 | //#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h" |
58 | 59 | //#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION |
59 | 60 | //#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION |
60 | 61 |
|
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. |
| 62 | +//---- Use stb_printf's faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined) |
| 63 | +// 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. |
63 | 64 | // #define IMGUI_USE_STB_SPRINTF |
64 | 65 |
|
| 66 | +//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui) |
| 67 | +// 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). |
| 68 | +// On Windows you may use vcpkg with 'vcpkg install freetype' + 'vcpkg integrate install'. |
| 69 | +//#define IMGUI_ENABLE_FREETYPE |
| 70 | + |
| 71 | +//---- Use stb_truetype to build and rasterize the font atlas (default) |
| 72 | +// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend. |
| 73 | +//#define IMGUI_ENABLE_STB_TRUETYPE |
| 74 | + |
65 | 75 | //---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4. |
66 | 76 | // This will be inlined as part of ImVec2 and ImVec4 class declarations. |
67 | 77 | /* |
|
75 | 85 | */ |
76 | 86 |
|
77 | 87 | //---- 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). |
| 88 | +// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices). |
79 | 89 | // Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer. |
80 | 90 | // Read about ImGuiBackendFlags_RendererHasVtxOffset for details. |
81 | 91 | //#define ImDrawIdx unsigned int |
82 | 92 |
|
83 | | -//---- Override ImDrawCallback signature (will need to modify renderer back-ends accordingly) |
| 93 | +//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly) |
84 | 94 | //struct ImDrawList; |
85 | 95 | //struct ImDrawCmd; |
86 | 96 | //typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data); |
|
0 commit comments