Skip to content

GLFW+OpenGL3 Example handles DPI correctly but, same example code in my project does notΒ #9003

@ExoticGamerrrYT

Description

@ExoticGamerrrYT

Version/Branch of Dear ImGui:

Version 1.92.4, Branch: docking

Back-ends:

imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp

Compiler, OS:

Windows 11 + MSVC 2022

Full config/build information:

Dear ImGui 1.92.4 WIP (19234)
--------------------------------

sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=199711
define: _WIN32
define: _WIN64
define: _MSC_VER=1944
define: _MSVC_LANG=201402
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
--------------------------------

io.BackendPlatformName: imgui_impl_glfw (3400)
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000483
 NavEnableKeyboard
 NavEnableGamepad
 DockingEnable
 ViewportsEnable
io.ConfigDpiScaleFonts
io.ConfigDpiScaleViewports
io.ConfigViewportsNoDecoration
io.ConfigViewportsNoDefaultParent
io.ConfigNavCaptureKeyboard
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00001C16
 HasMouseCursors
 HasSetMousePos
 PlatformHasViewports
 HasMouseHoveredViewport
 RendererHasTextures
 RendererHasViewports
--------------------------------

io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,128
io.Fonts->FontLoaderName: stb_truetype
io.DisplaySize: 1600.00,1000.00
io.DisplayFramebufferScale: 1.00,1.00
--------------------------------

style.WindowPadding: 10.00,10.00
style.WindowBorderSize: 1.00
style.FramePadding: 5.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 10.00,5.00
style.ItemInnerSpacing: 5.00,5.00

Details:

My Issue/Question:

I'm developing a GUI application with ImGui that includes docking support, allowing ImGui windows to be undocked from the main viewport.

The issue I'm facing is the following: when I run the official ImGui example with OpenGL3 and GLFW, everything works correctly - the scaling is proper and the interface looks sharp. However, when I integrate the exact same example code into my project, the interface appears blurry and not as crisp as it should be.

I've already compared the backend files using a diff checker to look for differences between the example and my implementation, but I haven't found any. What other factors could be causing this difference in visual quality? What might be affecting the rendering to make it appear blurry in my project?

Screenshots/Video:

Example one (sharp looking):
Image

My project:
Image

Minimal, Complete and Verifiable Example code:

Same code as in the example I said before

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions