Skip to content

Use SetProcessDpiAwarenessContext instead of SetThreadDpiAwarenessContext to fix the OpenGL3 Win32 example DPI scaling issue. - #9403

Closed
MouriNaruto wants to merge 1 commit into
ocornut:masterfrom
K7ware:win32_opengl_dpi_fix
Closed

Use SetProcessDpiAwarenessContext instead of SetThreadDpiAwarenessContext to fix the OpenGL3 Win32 example DPI scaling issue.#9403
MouriNaruto wants to merge 1 commit into
ocornut:masterfrom
K7ware:win32_opengl_dpi_fix

Conversation

@MouriNaruto

@MouriNaruto MouriNaruto commented May 19, 2026

Copy link
Copy Markdown
Contributor

For my desktop with NVIDIA GeForce RTX 5060 Ti (Driver Version 596.49) and 4K display with 125% scaling, the GPU driver seems to use multithreading to render OpenGL content, which causes render issues with High DPI.

Before this fix

image

After this fix

image

Reference when I try to find the issue: https://stackoverflow.com/questions/47049651/opengl-and-windows-10-per-monitor-aware-dpi-scaling

Kenji Mouri

…text to fix the OpenGL3 Win32 example DPI scaling issue.
@ocornut

ocornut commented May 19, 2026

Copy link
Copy Markdown
Owner

Hello,
Thanks for your PR!
Supported Windows version are not exactly the same so I guess we must try both. I'll work on this.

@ocornut ocornut added the opengl label May 19, 2026
ocornut pushed a commit that referenced this pull request May 19, 2026
…adDpiAwarenessContext when available, to fix the OpenGL3 Win32 example DPI scaling issue. (#9403)
@ocornut

ocornut commented May 19, 2026

Copy link
Copy Markdown
Owner

This is merged as 3e7b79a, I kept both codepath. Thank you!

@ocornut ocornut closed this May 19, 2026
@MouriNaruto
MouriNaruto deleted the win32_opengl_dpi_fix branch May 20, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants