mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-28 07:47:02 -05:00
Checking Out section
@@ -5,6 +5,7 @@ _(had to turn off wiki editing, see [Home](Home) for details. you may post meani
|
||||
- [Feedback Wanted!](#feedback-wanted)
|
||||
- [Preamble](#preamble)
|
||||
- [Game Loop?](#game-loop)
|
||||
- [Checking Out](#checking-out)
|
||||
- [Compiling/Linking](#compilinglinking)
|
||||
- [Setting up Dear ImGui & Backends](#setting-up-dear-imgui--backends)
|
||||
- [Example: If you are using Raw Win32 API + DirectX11](#example-if-you-are-using-raw-win32-api--directx11)
|
||||
@@ -61,17 +62,24 @@ while (application_not_closed)
|
||||
```
|
||||
In the case of your example application, we explicitly attempt to synchronize to screen refresh on swap/present, making the application refresh at the natural screen refresh rate. A full-fledged application may use different timing mechanism to throttle framerate, but this is outside of our scope.
|
||||
|
||||
## Compiling/Linking
|
||||
## Checking Out
|
||||
|
||||
It is preferable that your build yourself from sources.
|
||||
|
||||
- (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 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.
|
||||
|
||||
## Compiling/Linking
|
||||
|
||||
Dear ImGui does not mandate a particular build system. It is designed to be added to your existing application with an existing build system.
|
||||
|
||||
- (1) Add `imgui/` and `imgui/backends/` folders to include paths.
|
||||
- e.g. `-Irelative/path/to/imgui` with Clang/GCC.
|
||||
- (2) 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` and `imgui/*.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.
|
||||
|
||||
Reference in New Issue
Block a user