Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20494 Discussions

OpenGL incorrectly rendering with Windows 10's new per-monitor DPI support.

Robinson__Brad
Beginner
946 Views

System Setup Information:
-----------------------------------------

System Used: GA-X79-UP4
CPU SKU: i7
GPU SKU: HD5100
Processor Line: N/A
System BIOS Version: F7
CMOS settings: N/A
Graphics Driver Version: 20.19.15.4624
GOP/VBIOS Version: N/A
Operating System: Windows 10 Pro
OS Version: v1703 15063.671 (Creators Update)
API: OpenGL
Occurs on non-Intel GPUs?: Radeon No.  NVidia: different issues.

Steps to Reproduce:
-------------------------------
1.Download and build sample program from here: https://bitbucket.org/toptensoftware/minimalopengl/ (or use the pre-build exe in the repo)
2.Run the program - OpenGL graphics should appear scaled correctly.
3.Leave the program running
4.Go to Window's control panel -> Display -> Scale and Layout -> Change the size of text, apps, and other items to something different.
5.Switch back to sample program, notice the graphics are shifted
6.Close the program and restart it - same problem is evident.
7.Sign out and sign back in - graphics now render correctly.
8.Problem happens whenever the DPI reported by GetDpiForSystem() and GetDpiForWindow() are different (ie: after changing scaling, but before sign out/sign in).

Expected Results:
-------------------------------

Graphics correctly scaled (as per sample screen shots for Radeon cards in the linked repository)

Actual Results:
-------------------------------

Graphics are shifted - most noticably vertically and approximately by the difference in menu bar height at the old resolution vs the new

Notice the gap between the menu and the black OpenGL rendering - and duplicated menu text artefact.

RenderIssue

Additional Information:
-------------------------------

See the repository for more screen shots: https://bitbucket.org/toptensoftware/minimalopengl/

 

1 Reply
wbond
Beginner
884 Views

An extra data point here. We've got a similar issue with an app that uses DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2. If we don't call SetMenu() before calling wglCreateContext(), or end up changing the menu visibility after initializing OpenGL, we get artifacts at the top of the window equal to the height of the menu.

Only happens with Intel drivers, not Nvidia or AMD drivers. I've been testing with driver version 27.20.100.9030.

0 Kudos
Reply