Skip to content

Guide · Open source

How to use imgui: install, build and add a debug panel

Updated · written with AI from the project's own documentation and checked against our catalogue data

imgui (Dear ImGui) is a C++ library for drawing graphical user interfaces such as buttons, sliders and windows. It is described as bloat-free with minimal dependencies, and it is commonly used for debug panels and tools inside games and other software. This guide explains how to get the source, what you need before building it, and who it suits, so you can decide whether it fits your project.

Dear ImGuiocornut/imgui · ★ 76.9k · MIT

Quick start

  1. 1Check prerequisites. Make sure you have a C++ compiler and Git installed.
  2. 2Clone the repository. Run git clone https://github.com/ocornut/imgui to download the source.
  3. 3Add imgui to your project. Include the library source in your build system.
  4. 4Set up a render loop. Create an interface frame in each pass of your application's loop.
  5. 5Draw a simple panel. Add one window with a button and a slider to confirm it works.
  6. 6Build and run. Compile your project and check that the panel appears.

What is Dear ImGui and who is it for?

Dear ImGui is a library, not a finished application. You write C++ code that calls its functions to draw interface elements, and your program displays them.

It is a good fit for game developers who want an in-engine debug or tools panel, C++ developers building internal tools that need a quick interface, and developers who want a small GUI library with few dependencies.

What do you need before you start?

The installation method is clone-and-build. You need a C++ compiler and Git on your machine. The README provided for this guide was empty, so the exact supported platforms and compiler versions are not listed here; check the repository for those details.

  • A C++ compiler
  • Git

How do you get the imgui source code?

Clone the repository with Git using the command below. This downloads the source files into a local folder, which you then build as part of your own project.

git clone https://github.com/ocornut/imgui

How do you use imgui in your project?

Because imgui is a library, you add its source to your build and call its functions from your application's render loop. Read the repository files and examples to see how the library is wired to a window and graphics backend in your setup.

Keep the interface code small at first: draw one window with a button and a slider, confirm it appears, then add more panels as needed.

  • Clone the repository and add its files to your build.
  • Create an interface frame in your loop and draw windows, buttons and sliders.
  • Compile and run to check the panel appears.

When should you choose something else?

imgui is not a ready-made desktop app for people who want no coding. It is also not the best choice if your team needs a native-looking, polished end-user interface out of the box, since the README provided does not establish that.

Comparable projects mentioned for this category include Qt, Nuklear and GLFW-based UI toolkits. Forks of Dear ImGui are not listed here.

  • Qt: a broader toolkit for full application interfaces.
  • Nuklear: another small C GUI library to compare.
  • GLFW-based UI toolkits: consider these for window and input handling alongside a UI layer.

What people use it for

  • An in-engine debug panel for a game to tweak values while it runs.
  • A quick internal tool for a C++ team that needs buttons, sliders and windows.
  • A small GUI inside other C++ software where a lightweight dependency matters.

Frequently asked questions

Is imgui free to use?

imgui is released under the MIT licence, as listed for this project. Check the licence file in the repository for the full terms before using it in a commercial product.

What do I need to install imgui?

You need a C++ compiler and Git. The installation method is to clone the repository and build it as part of your project.

How do I download imgui?

Run git clone https://github.com/ocornut/imgui in a terminal. This copies the source code to your computer.

Is imgui a desktop app I can just open?

No. imgui is a library for developers. You need to write C++ code that uses it to show any interface.

What are alternatives to imgui?

Comparable projects mentioned include Qt, Nuklear and GLFW-based UI toolkits. Choose based on whether you need a small debug panel or a full application interface.

Why is imgui used for game debug panels?

It is commonly used for debug panels and tools inside games and other software, and it is described as bloat-free with minimal dependencies.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use imgui if you are a C++ developer who wants a small, low-dependency library for debug panels or internal tools. Pick a different option if you need a polished, native-looking end-user interface or a ready-made app without coding.

Install options & downloads