imgui is a free, open source gaming project written in C++ and released under MIT. It has 76,246 GitHub stars, 12,044 forks and 1,227 open issues, and was last pushed 2 hours ago. On this registry it ranks #3 of 12 tracked projects in Gaming, with 5 head-to-head comparisons available.

What is imgui?

Dear ImGui is a bloat-free, MIT-licensed graphical user interface library for C++ that outputs optimized vertex buffers for rendering inside 3D-pipeline-enabled applications, and it is aimed at programmers building content creation, visualization, and debug tools rather than at developers shipping consumer-facing UI.

What it is

Dear ImGui is an immediate-mode GUI library written in C++ and distributed under the MIT license. Its core is self-contained within a few platform-agnostic files, all of which sit in the root folder of the repository (imgui*.cpp, imgui*.h). The library is renderer agnostic, so it does not drag in a graphics API of its own, and it has no external dependencies. The README describes it as portable, multi-platform, and native, with output in the form of vertex buffers that the host application renders at any point in its own pipeline. It lives in the game development and game engine space, and its topic list places it under immediate-gui, gui, framework, and library.

The concrete problem it solves is state synchronization in user interface code. Retained-mode toolkits ask developers to hold UI state in one place and mirror it into widgets in another, which produces a class of bugs the README opens by quoting ryg about: "teach them how to represent state in two separate locations that have to be kept in sync and they'll have bugs for a lifetime." Dear ImGui takes the opposite approach. The interface is rebuilt every frame from the current data set, so the UI is a reflection of live state rather than a stored copy of it. The stated goals are to minimize state synchronization, minimize UI-related state storage on the user side, and minimize setup and maintenance.

Key capabilities

  • Immediate-mode API: interface described per frame, so dynamic UI reflects a dynamic data set with no UI state kept on the user side.
  • Self-contained core in the root files imgui*.cpp and imgui*.h, with no external dependencies and no specific build process required.
  • Renderer-agnostic output of optimized vertex buffers, allowing the UI to be drawn inside an existing 3D pipeline.
  • Portability to consoles, phones, embedded targets, and fullscreen applications where operating system features are non-standard.
  • Backends for a variety of graphics APIs, plus language bindings and framework backends catalogued in the project wiki.
  • A separate imgui_test_engine repository, with continuous integration covering build, static analysis, and tests.
  • Efficient runtime and memory consumption, with code-driven and data-driven tool construction as a first-class use case.

Who uses it and how

  • Engine and tools programmers embed it directly in a game engine to build in-editor tooling, debug panels, and content creation interfaces.
  • Teams working on real-time 3D applications, fullscreen applications, and embedded or console platforms use it where standard operating system widgets are unavailable.
  • Developers build both ad hoc, short-lived tools and long-lived, elaborate tools from the same API surface, which the README lists as a design goal.
  • The library is described as battle-tested and used by many major actors in the game industry, with a wiki page listing software that uses Dear ImGui.
  • It is a programmer-facing library; the README states the target is content creation and visualization or debug tooling rather than UI for the average end-user.

Getting started

The README states that no specific build process is required: add all files from the root folder of the repository, the imgui*.cpp and imgui*.h sources, into an existing project, then select a backend from the language bindings and framework backends listed in the wiki.

How it compares

No paid products replaced by this project are given in the facts, and no comparable GUI libraries are named either. On the facts available, Dear ImGui stands alone in this registry.

When to use it — and when not to

There is no database, object storage, or mail service to operate, because the library compiles into the host application, but an adopter does take on integration: choosing a backend, wiring the renderer, and carrying the source tree forward with the project. Teams that need full internationalization, including right-to-left text, bidirectional text, and text shaping, or that need accessibility features, should not pick it, since the README states plainly that those are not supported and that it lacks features found in higher-level libraries. Prospective users should also note the volume of open issues and that development is sustained by sponsorship and support contracts rather than by a commercial vendor.

project readme (upstream, from github) — read inline

Dear ImGui

"Give someone state and they'll have a bug one day, but teach them how to represent state in two separate locations that have to be kept in sync and they'll have bugs for a lifetime." -ryg


Build Status Static Analysis Status Tests Status

(This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using Dear ImGui, please consider reaching out.)

Businesses: support continued development and maintenance via invoiced sponsoring/support contracts:
  E-mail: contact @ dearimgui dot com
Individuals: support continued development and maintenance here. Also see Funding page.

The Pitch

Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline-enabled application. It is fast, portable, renderer agnostic, and self-contained (no external dependencies).

Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal and lacks certain features commonly found in more high-level libraries. Among other things, full internationalization (right-to-left text, bidirectional text, text shaping etc.) and accessibility features are not supported.

Dear ImGui is particularly suited to integration in game engines (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on console platforms where operating system features are non-standard.

  • Minimize state synchronization.
  • Minimize UI-related state storage on user side.
  • Minimize setup and maintenance.
  • Easy to use to create dynamic UI which are the reflection of a dynamic data set.
  • Easy to use to create code-driven and data-driven tools.
  • Easy to use to create ad hoc short-lived tools and long-lived, more elaborate tools.
  • Easy to hack and improve.
  • Portable, minimize dependencies, run on target (consoles, phones, etc.).
  • Efficient runtime and memory consumption.
  • Battle-tested, used by many major actors in the game industry.

Usage

The core of Dear ImGui is self-contained within a few platform-agnostic files which you can easily compile in your application/engine. They are all the files in the root folder of the repository (imgui*.cpp, imgui*.h). No specific build process is required: you can add all files into your existing project.

Backends for a variety of graphics API and rendering platforms are provided in the backends/ folder, along with example applications in the examples/ folder. You may also create your own backend. Anywhere where you can render textured triangles, you can render Dear ImGui.

C++20 users wishing to use a module may use the stripe2933/imgui-module third-party extension.

See the Getting Started & Integration section of this document for more details.

After Dear ImGui is set up in your application, you can use it from _anywhere_ in your program loop:

ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
    MySaveFunction();
ImGui::InputText("string", buf, IM_COUNTOF(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
sample code output (dark) sample code output (light)
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
    if (ImGui::BeginMenu("File"))
    {
        if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
        if (ImGui::MenuItem("Save", "Ctrl+S"))   { /* Do stuff */ }
        if (ImGui::MenuItem("Close", "Ctrl+W"))  { my_tool_active = false; }
        ImGui::EndMenu();
    }
    ImGui::EndMenuBar();
}

// Edit a color stored as 4 floats
ImGui::ColorEdit4("Color", my_color);

// Generate samples and plot them
float samples[100];
for (int n = 0; n < 100; n++)
    samples[n] = sinf(n * 0.2f + ImGui::GetTime() * 1.5f);
ImGui::PlotLines("Samples", samples, 100);

// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
    ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();

my_first_tool_v192 6

Dear ImGui allows you to create elaborate tools as well as very short-lived ones. On the extreme side of short-livedness: using the Edit&Continue (hot code reload) feature of modern compilers you can add a few widgets to tweak variables while your application is running, and remove the code a minute later! Dear ImGui is not just for tweaking values. You can use it to trace a running algorithm by just emitting text commands. You can use it along with your own reflection data to browse your dataset live. You can use it to expose the internals of a subsystem in your engine, to create a logger, an inspection tool, a profiler, a debugger, an entire game-making editor/framework, etc.

How it works

The IMGUI paradigm through its API tries to minimize superfluous state duplication, state synchronization, and state retention from the user's point of view. It is less error-prone (less code and fewer bugs) than traditional retained-mode interfaces, and lends itself to creating dynamic user interfaces. Check out the Wiki's About the IMGUI paradigm section for more details.

Dear ImGui outputs vertex buffers and command lists that you can easily render in your application. The number of draw calls and state changes required to render them is fairly small. Because Dear ImGui doesn't know or touch graphics state directly, you can call its functions anywhere in your code (e.g. in the middle of a running algorithm, or in the middle of your own rendering process). Refer to the sample applications in the examples/ folder for instructions on how to integrate Dear ImGui with your existing codebase.

A common misunderstanding is to mistake immediate mode GUI for immediate mode rendering, which usually implies hammering your driver/GPU with a bunch of inefficient draw calls and state changes as the GUI functions are called. This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a small list of draw calls batches. It never touches your GPU directly. The draw call batches are decently optimal and you can render them later, in your app or even remotely.

Releases & Changelogs

See Releases page for decorated Changelogs. Reading the changelogs is a good way to keep up to date with the things Dear ImGu

readme truncated — read the full docs on github

Frequently asked questions

Is imgui free to use?

imgui is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does imgui do?

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

What is imgui written in?

imgui is primarily written in C++. Its source is publicly available at https://github.com/ocornut/imgui, and it has 76,246 GitHub stars.