# Dear ImGui
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). - github / demo / 2
- ImStudio - online code generator
-
implot3d / HN - easy-to-use, high-performance 3D plotting functionality.
- CppCon 2016: Nicolas Guillemot “Dear imgui”
- Why is ImGui so highly liked?
- Useful Extensions - An exhaustive list of all known extensions/plugins/reusable piece of code related to Dear ImGui.
- Visual debugging
- Why and How To Use ImGui For Your Coding Projects
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
Features
- Widget(s) on same line
- CheckBox & conditional code
- Input Integer Box
- Tables
- Column Selection - need to used unique id for “header label” which can be hidden “##hidenlable” + do not use flag ImGuiSelectableFlags_SpanAllColumns
- Row selection
- Cell background color
- Copy to clibpboard
- disabling arrow navigation
About the IMGUI paradigm
Dear ImGui is one possible implementation of an idea generally described as the IMGUI (Immediate Mode GUI) paradigm. The Immediate Mode GUI paradigm may at first appear unusual to some users. This is mainly because “Retained Mode” GUIs have been so widespread and predominant. The following links can give you a better understanding about how Immediate Mode GUIs works.
Immediate Mode
- the client calls directly cause rendering of graphics objects to the display, or in which
- the data to describe rendering primitives is inserted frame by frame directly from the client into a command list (in the case of immediate mode primitive rendering),without the use of extensive indirection - thus immediate - to retained resources.
Retained Mode
- the graphics library, instead of the client, retains the scene (complete object model of the rendering primitives) to be rendered and
- the client calls into the graphics library do not directly cause actual rendering, but make use of extensive indirection to resources, managed – thus retained – by the graphics library.
What are the performance implications of using an immediate-mode GUI compared to a retained-mode GUI?
C++ Starter
With Meson use the Wrap to simplify your life (and generaly is prefered to the system packaging).
see How to force subproject vs system in Meson.
And the following main.cpp SDL2 (Win32, Mac, Linux, etc.) + SDL_Renderer for SDL2
see also
- ImGui + SFML Tutorial
- Usefull Extension - a list of additional widget
- Using Dear ImGui with modern C++
Bindings
Crystal
Installation
- Install CrSFML
- install SFML
sudo apt-get install libsfml-dev
- install SFML
- Install crystal-imgui-sfml
- using shard in a new project
-
crystal init app gui_app
- add depedencies
shards install
- using shard in a new project
-
Ruby
- tested only on windows
Alternative
- Nuklear (C) / HN - online example
- raygui - a simple and easy-to-use immediate-mode-gui library.
- micro ui - A tiny, portable, immediate-mode UI library written in ANSI C