mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-08 23:45:46 +01:00
Module support is easy to break from the header side, e.g. by a new system include, a forward-declared platform type, or an export block that misses a declaration. This adds a CMake project that builds every module whose platform library is found, alongside the header build of the same code. Linking alone doesn't show that the module behaves like the headers, so the main check is differential. 'DIFF' tests are compiled once with 'import imgui;' and once with '#include "imgui.h"'. Both builds run the same scripted frames and must print the same hash of the draw data and texture uploads (test_diff.h, compare_output.cmake). Backends that need a GPU or a display are only linked, and wgpu is only compiled. The core module and the null backend are also built for each compile-time configuration that CI builds example_null with, because IMGUI_DISABLE_* and friends change what gets exported. Presets use Clang, Ninja and 'import std'. Toolchains for cross builds belong in CMakeUserPresets.json, which is ignored along with build/.
misc/cpp/ InputText() wrappers for C++ standard library (STL) type: std::string. This is also an example of how you may wrap your own similar types. misc/debuggers/ Helper files for popular debuggers (Visual Studio, GDB, LLDB). e.g. With the .natvis file, types like ImVector<> will be displayed nicely in Visual Studio debugger. misc/fonts/ Fonts loading/merging instructions (e.g. How to handle glyph ranges, how to merge icons fonts). Command line tool "binary_to_compressed_c" to create compressed arrays to embed data in source code. Suggested fonts and links. misc/freetype/ Font atlas builder/rasterizer using FreeType instead of stb_truetype. Benefit from better FreeType rasterization, in particular for small fonts. misc/single_file/ Single-file header stub. We use this to validate compiling all *.cpp files in a same compilation unit. Users of that technique (also called "Unity builds") can generally provide this themselves, so we don't really recommend you use this in your projects.