Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

App Runners

Hello ImGui and ImmApp are the two main ways to create applications with ImGui Bundle.

These runners enable you to create powerful ImGui applications with minimal boilerplate code.


Interactive Manual

The best way to learn is through the Interactive Manual. The “Demo Apps” tab lets you explore demos with their source code in Python and C++.

ImGui Bundle Interactive Manual - Explore the “Demo Apps” tab

ImGui Bundle Interactive Manual - Explore the “Demo Apps” tab

Hello ImGui

Quick Start

Python
C++
from imgui_bundle import hello_imgui, imgui

def gui():
    imgui.text("Hello, world!")

hello_imgui.run(gui, window_title="My App", window_size=(800, 600))

Documentation

Features

Application Features:

Multiplatform:

Configuration with RunnerParams

For full control, configure your application via RunnerParams:

Python
C++
from imgui_bundle import hello_imgui, imgui

def gui():
    imgui.text("Hello!")

# Create and configure runner params
params = hello_imgui.RunnerParams()
params.app_window_params.window_title = "My Application"
params.app_window_params.window_geometry.size = (1200, 800)
params.app_window_params.restore_previous_geometry = True

# ImGui window settings
params.imgui_window_params.show_menu_bar = True
params.imgui_window_params.show_status_bar = True

# Set the GUI callback
params.callbacks.show_gui = gui

# Run
hello_imgui.run(params)

See RunnerParams Reference for all configuration options. For Python, see RunnerParams Type Hints

Callbacks

Hello ImGui provides several callback hooks:

CallbackWhen Called
show_guiEvery frame (main GUI)
show_menusEvery frame (menu bar content)
show_statusEvery frame (status bar)
post_initOnce, after OpenGL initialization
before_exitOnce, before shutdown

See Full Callback Reference for details. For Python, see Callbacks Type Hints.

Application Settings

ImGui applications store settings (window positions, etc.) in an INI file. By default, it’s named after your window title. For production apps, use a proper config location:

params.ini_folder_type = hello_imgui.IniFolderType.app_user_config_folder  # ~/.config or AppData
params.ini_filename = "my_app/settings.ini"

You can also store custom settings: hello_imgui.save_user_pref("key", "value") / load_user_pref("key")

DPI-Aware Sizing

Never use fixed pixel sizes. This leads to portability issues on high-DPI screens.

Instead, use sizes relative to the font size using “em” units. Hello ImGui provides helper functions:

Python
C++
from imgui_bundle import imgui, em_to_vec2, em_size

def gui():
    # Button sized as 10em x 2em (scales with DPI)
    imgui.button("A button", em_to_vec2(10, 2))

    # For single values, use em_size
    width = em_size(10)

ImmApp

ImmApp handles add-on initialization automatically via simple boolean flags.

Quick Start

Python
C++
from imgui_bundle import immapp, imgui, implot, imgui_md

def gui():
    imgui_md.render("# Hello with Markdown!")

    if implot.begin_plot("My Plot"):
        implot.plot_line("data", [1, 2, 3, 4], [1, 4, 2, 3])
        implot.end_plot()

# Enable add-ons with simple flags
immapp.run(
    gui,
    window_title="My App",
    window_size=(800, 600),
    with_implot=True,
    with_markdown=True
)

Available Add-ons

FlagAdd-onDescription
with_implotImPlot2D plotting
with_implot3dImPlot3D3D plotting
with_markdownimgui_mdMarkdown rendering
with_node_editorimgui-node-editorNode graphs
with_tex_inspectimgui_tex_inspectTexture inspector

Full Configuration

For advanced configuration, use RunnerParams (same as Hello ImGui) combined with AddOnsParams:

immapp.run(runner_params, addons)  # Python
ImmApp::Run(runnerParams, addons);  // C++

Demonstrations

Below are demonstrations from the ImGui Bundle Interactive Manual, showcasing various features of Hello ImGui and ImmApp.

Docking Demo

Docking Demo - Full-featured ImGui application with Hello ImGui

Docking Demo - Full-featured ImGui application with Hello ImGui

Docking Demo shows how to create a full-featured application:

The source code is heavily documented and can be used as a template for your own applications.

Source code: Python | C++

ImmApp - Launch an app with addons

ImmApp with add-ons: assets, markdown, and ImPlot

ImmApp with add-ons: assets, markdown, and ImPlot

Demonstrates how to use ImmApp with multiple add-ons:

Source code: Python | C++

Custom 3D Background

Custom 3D background with OpenGL shaders

Custom 3D background with OpenGL shaders

Demonstrates how to render a custom 3D background using OpenGL:

Source code: Python | C++

Power Save Mode

Demonstrates FPS idling to reduce CPU usage when the app is idle.

Hello ImGui automatically reduces FPS when no user interaction is detected. Configure this with:

immapp.run(gui, fps_idle=10.0)  # 10 FPS when idle

# Or dynamically:
runner_params = hello_imgui.get_runner_params()
runner_params.fps_idling.fps_idle = 10.0
runner_params.fps_idling.enable_idling = True

Advanced - Manual Rendering

For complete control over the render loop (useful for game engines or custom frameworks), use manual rendering instead of run().

Python
C++
from imgui_bundle import imgui, hello_imgui, immapp

def gui():
    imgui.text("Hello, ImGui Bundle!")

# Setup
runner_params = hello_imgui.RunnerParams()
runner_params.callbacks.show_gui = gui
addons = immapp.AddOnsParams()
addons.with_implot = True
immapp.manual_render.setup_from_runner_params(runner_params, addons)

# Custom render loop
while not hello_imgui.get_runner_params().app_shall_exit:
    immapp.manual_render.render()
    # Do other work here (physics, networking, etc.)

# Cleanup
immapp.manual_render.tear_down()

Use cases: game engine integration, heavy computation between frames, synchronizing with external systems, precise frame timing control.

Demo: Try online | Python | C++


See Also