Skip to main content

Getting Help

For first-time users having issues compiling, linking, running, or loading fonts:
Post in Discussions for compilation/setup issues. Use Issues for bugs, feature requests, and building a knowledge database.

Integration Issues

Little Squares Instead of Text

Your renderer backend is not using the font texture correctly or it hasn’t been uploaded to the GPU. Symptoms:
  • Text appears as white rectangles
  • All characters show as empty squares
Common causes:
Before v1.92: Did you modify the font atlas after ImGui_ImplXXX_NewFrame()?The texture atlas may be too large for your graphics API. This happens with many fonts or large glyph ranges.Solutions:
  • Reduce oversampling: font_config.OversampleH = 1
  • Load fewer glyph ranges
  • Set io.Fonts.Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight
Since v1.92 with updated backends: This should be rare. Please report if it happens.
If using a custom backend:
  • Verify texture is uploaded to GPU
  • Check that shaders and rendering states are correct
  • Ensure texture is bound during rendering
  • Use a graphics debugger like RenderDoc
  • Compare your code to existing backends

Clipping Issues

Symptoms:
  • Elements disappear when moving windows
  • UI clips incorrectly at window boundaries
  • Widgets render outside expected bounds
Cause: Mishandling clipping rectangles in render function.
Dear ImGui clipping rectangles are defined as (x1=left, y1=top, x2=right, y2=bottom) NOT as (x1, y1, width, height).
Solution:
Refer to rendering backends in the backends/ folder for correct implementations.

Widget Not Reacting to Clicks

Most common mistake: Using the same ID for multiple widgets.
Dear ImGui needs unique IDs for interactive widgets. IDs are built from:
  • Window name
  • Widget labels
  • ID stack (PushID/PopID)
Wrong:
Correct - Using ## suffix:
Correct - Using PushID:
Use Demo > Tools > ID Stack Tool or call ImGui::ShowIDStackToolWindow() to debug ID issues.

Input Handling

When to Dispatch Input to ImGui vs Application

Use the io.WantCaptureMouse and io.WantCaptureKeyboard flags:
Always pass mouse/keyboard inputs to Dear ImGui, regardless of WantCapture flags. ImGui needs input to detect clicks in empty areas to unfocus windows.
Available flags:
  • io.WantCaptureMouse - ImGui wants mouse input (hovering window, etc.)
  • io.WantCaptureKeyboard - ImGui wants keyboard input (typing in InputText, etc.)
  • io.WantTextInput - Notify OS to show on-screen keyboard (mobile/console)

Keyboard/Gamepad Navigation

Enable navigation in configuration:
See USING GAMEPAD/KEYBOARD NAVIGATION CONTROLS section in imgui.cpp for details.

Font Issues

Missing Glyphs

Since v1.92 with updated backend: Specifying glyph ranges is unnecessary! Missing glyph issues should be rare.
Pre-1.92 or without updated backend: If you see squares for non-ASCII characters, you need to load fonts with explicit glyph ranges:

Font Loading Fails

Symptom: Assert “Could not load font file!” Cause: Incorrect filename or wrong working directory.
Remember: In C/C++, backslashes must be escaped:
Working directory: Make sure your IDE runs your executable from the correct directory.In Visual Studio: Project Properties > Debugging > Working Directory

UTF-8 Encoding Issues

Symptom: Non-ASCII characters display incorrectly Cause: Source code not encoded as UTF-8
Use the built-in encoding viewer:
Or use Metrics/Debugger > Tools > UTF-8 Encoding viewer
Use u8 prefix (C++11):
Visual Studio compiler flags:
  • Add /utf-8 command-line flag
  • Or use #pragma execution_character_set("utf-8")
C++20 note: u8"" returns const char8_t*, requiring cast:
Disable this with /Zc:char8_t- (MSVC) or -fno-char8_t (Clang/GCC).

Display Issues

DPI Scaling

Symptom: Blurry text on high-DPI displays Cause: Application not marked as DPI-aware
You must inform Windows that your app is DPI-aware:SDL2:
SDL3:
GLFW: AutomaticOther Windows projects:
Or use an application manifest.
Since v1.92:

Layout Issues

Overlapping widgets:
Widgets not visible:

Debug Tools

Metrics/Debugger Window

Displays:
  • Window information
  • Draw command details
  • Font atlas visualization
  • Internal state

Demo Window

The demo is the best learning resource. Study its code in imgui_demo.cpp.

ID Stack Tool

Debug ID conflicts by hovering over widgets to see their ID path.

Style Editor

Live-edit all style properties.

Performance Issues

  • Minimize window count
  • Use less rounded corners
  • Reduce anti-aliasing
  • Batch similar items
  • Don’t call ImGui::Begin() for collapsed windows
  • Use ImGuiWindowFlags_NoBackground when appropriate
  • Reduce transparency
  • Simplify layouts
  • Reduce texture atlas size
  • Lower oversampling
  • Disable anti-aliasing on low-end hardware
  • Reduce window count
See Performance Guide for detailed optimization.

Platform-Specific Issues

Windows

Visual Studio: Set project type to “Windows Application” instead of “Console Application”Or use:
Make sure you’re linking against:
  • Graphics API libraries (OpenGL32.lib, d3d11.lib, etc.)
  • Platform libraries (user32.lib, gdi32.lib, etc.)
  • ImGui .cpp files are compiled and linked

Linux

Use glad, glew, or gl3w. Make sure loader is initialized before ImGui_ImplOpenGL3_Init().

macOS

Handle display scale properly:
Since v1.92: macOS pixel/backing scale is automatically handled.

Web (Emscripten)

Required flags:

Common Misconceptions

Don’t check if mouse is hovering a window manually. Use io.WantCaptureMouse instead.
Don’t skip calling ImGui::Begin() even if it returns false. Always call matching ImGui::End().
Don’t modify ImGuiStyle mid-frame. Use PushStyleVar/PushStyleColor or modify between frames.

See Also