Getting Help
For first-time users having issues compiling, linking, running, or loading fonts:- Use GitHub Discussions
- Search Issues for similar problems
- Read the FAQ
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
Font atlas not uploaded (Pre-1.92)
Font atlas not uploaded (Pre-1.92)
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
Font atlas not uploaded (1.92+)
Font atlas not uploaded (1.92+)
Since v1.92 with updated backends: This should be rare. Please report if it happens.
Custom backend texture issues
Custom backend texture issues
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
Dear ImGui clipping rectangles are defined as
(x1=left, y1=top, x2=right, y2=bottom) NOT as (x1, y1, width, height).backends/ folder for correct implementations.
Widget Not Reacting to Clicks
Most common mistake: Using the same ID for multiple widgets.Understanding the ID Stack System
Understanding the ID Stack System
Dear ImGui needs unique IDs for interactive widgets. IDs are built from:Correct - Using ## suffix:Correct - Using PushID:
- Window name
- Widget labels
- ID stack (PushID/PopID)
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 theio.WantCaptureMouse and io.WantCaptureKeyboard 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: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.
Font Loading Fails
Symptom: Assert “Could not load font file!” Cause: Incorrect filename or wrong working directory.File Path Issues
File Path Issues
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 DirectoryUTF-8 Encoding Issues
Symptom: Non-ASCII characters display incorrectly Cause: Source code not encoded as UTF-8Verify UTF-8 Encoding
Verify UTF-8 Encoding
Use the built-in encoding viewer:Or use
Metrics/Debugger > Tools > UTF-8 Encoding viewerFix Encoding in Your Code
Fix Encoding in Your Code
Use u8 prefix (C++11):Visual Studio compiler flags:Disable this with
- Add
/utf-8command-line flag - Or use
#pragma execution_character_set("utf-8")
u8"" returns const char8_t*, requiring cast:/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-awareWindows DPI Awareness
Windows DPI Awareness
You must inform Windows that your app is DPI-aware:SDL2:SDL3:GLFW: AutomaticOther Windows projects:Or use an application manifest.
Font DPI Scaling
Font DPI Scaling
Since v1.92:
Layout Issues
Overlapping widgets:Debug Tools
Metrics/Debugger Window
- Window information
- Draw command details
- Font atlas visualization
- Internal state
Demo Window
imgui_demo.cpp.
ID Stack Tool
Style Editor
Performance Issues
Too Many Draw Calls
Too Many Draw Calls
- Minimize window count
- Use less rounded corners
- Reduce anti-aliasing
- Batch similar items
CPU Usage High
CPU Usage High
- Don’t call
ImGui::Begin()for collapsed windows - Use
ImGuiWindowFlags_NoBackgroundwhen appropriate - Reduce transparency
- Simplify layouts
GPU Usage High
GPU Usage High
- Reduce texture atlas size
- Lower oversampling
- Disable anti-aliasing on low-end hardware
- Reduce window count
Platform-Specific Issues
Windows
Console Window Appears
Console Window Appears
Visual Studio: Set project type to “Windows Application” instead of “Console Application”Or use:
Linker Errors
Linker Errors
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
OpenGL Loader Issues
OpenGL Loader Issues
Use glad, glew, or gl3w. Make sure loader is initialized before ImGui_ImplOpenGL3_Init().
macOS
Retina Display Issues
Retina Display Issues
Handle display scale properly:Since v1.92: macOS pixel/backing scale is automatically handled.
Web (Emscripten)
Compilation Flags
Compilation Flags
Required flags:
Common Misconceptions
See Also
- FAQ - Comprehensive FAQ
- Examples - Working example applications
- Best Practices - Recommended patterns
- GitHub Discussions - Community help