From 3aa43bcbac021d4b7a77098257caeb03a57dafb3 Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 26 Nov 2025 14:46:19 +0100 Subject: [PATCH] Tweaks + add reference to C++20 imgui-module --- Getting-Started.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Getting-Started.md b/Getting-Started.md index d284be8..1060a55 100644 --- a/Getting-Started.md +++ b/Getting-Started.md @@ -66,13 +66,15 @@ In the case of your example application, we explicitly attempt to synchronize to - (1) Decide which branch to pull: - `master` or `docking`, the later adds support for [Docking](https://github.com/ocornut/imgui/wiki/Docking) and [Multi-viewports](https://github.com/ocornut/imgui/wiki/Multi-Viewports). - Both branches are maintained, you can easily switch anytime. -- (2) Pull the repository into a submodule of your project, or simply download/copy the repository in yours and commit it. -- (3) Add files to your project or build system of your choice, so they get compiled and linked into your app. - - Add all source files in the root folder: `imgui/{*.cpp,*.h}`. - - Add selected `imgui/backends/imgui_impl_xxxx{.cpp,.h}` files corresponding to the technology you use from the `imgui/backends/` folder (e.g. if your app uses SDL2 + DirectX11, add `imgui_impl_sdl2.cpp`, `imgui_impl_dx11.cpp` etc.). If your engine uses multiple APIs you may include multiple backends. - - Visual Studio users: Add `misc/debuggers/imgui.natvis` and `misc/debuggers/imgui.natstepfilter` to improve the debugging experience. - - std::string users: Add `misc/cpp/imgui_stdlib.*` to easily use InputText with std::string. -- (4) Add `imgui/` and `imgui/backends/` folders to include paths. (You may omit the `imgui/backends` one and add a `backends/` prefix when including the backends header files). +- (2) Pull the repository into a sub-module of your project, or simply download/copy the repository in yours and commit it. +- (3) Add `imgui/` and `imgui/backends/` folders to include paths. + - You may omit the `imgui/backends` one and add a `backends/` prefix when including the backends header files. +- (4) Add files to your project or build system of your choice, so they get compiled and linked into your app. + - Add core: all source files from the root folder: `imgui/{*.cpp,*.h}`. + - Add backends: add `imgui/backends/imgui_impl_xxxx{.cpp,.h}` files corresponding to the technology you use from the `imgui/backends/` folder (e.g. if your app uses SDL2 + DirectX11, add `imgui_impl_sdl2.cpp/.h` and `imgui_impl_dx11.cpp/.h` etc.). If your engine uses multiple APIs you may include multiple backends. + - Misc: Debugger users: See [misc/debuggers](https://github.com/ocornut/imgui/tree/master/misc/debuggers) to improve your debugging experience. Visual Studio users can add `imgui.natvis` and `imgui.natstepfilter` to their project. + - Misc: std::string users: Add `misc/cpp/imgui_stdlib.*` to easily use `InputText()` with `std::string` type. + - Misc: C++20 users wishing to use C++20 modules may use the [stripe2933/imgui-module](https://github.com/stripe2933/imgui-module) third-party project. It is recommended that you follow those steps and not attempt to build Dear ImGui as a static or shared library! It's perfectly possible to do, but if you are following a "Getting Started" guide the last thing you want to do is to create yourself more problems. Note that Dear ImGui is both small and easy to build, so adding its files directly to your project should be fine. Note that Dear ImGui is a very call-heavy API, so building as a shared library is not ideal because of increased function calling overhead. @@ -591,4 +593,5 @@ Note that there may be additional calls required surrounding this depending on t - Run `ImGui::ShowDemoWindow()`. Browse imgui_demo.cpp to find how things are done. - You may also refer to @pthom's [interactive imgui_manual](https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html) which matches the output of the demo window with corresponding source code. - Use [Item Picker](https://github.com/ocornut/imgui/wiki/Debug-Tools) to easily debug break into the code of a given item. -- Read [Wiki](https://github.com/ocornut/imgui/wiki) for more. \ No newline at end of file +- Read [Wiki](https://github.com/ocornut/imgui/wiki) for more. +- You may edit `imconfig.h` or use `#define IMGUI_USER_CONFIG \"my_imconfig.h\"` to use compile-time configuration features.