microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.49k stars 396 forks source link

"Basic Game Loop" from supplied Win32 template results in invalid window regions after window resize #177

Closed jeremyong closed 7 months ago

jeremyong commented 1 year ago

Before resize:

image

After resize:

image

Note the white border on the bottom and and right of the "after image."

I was running into this issue myself and decided to install the templates provided here. Surprisingly, it seems the template suffers from the same issue as seen above. My current workaround is to shift the window 1 pixel back-and-forth immediately after resize, but obviously I would prefer to understand the root cause for why this happens. I am encountering this issue on Windows 10 Pro 22H2 (build 19045.3208). Any ideas would be appreciated, thanks!

walbourn commented 1 year ago

Is this a Win32 desktop application or a UWP?

jeremyong commented 1 year ago

This is a Win32 desktop application

walbourn commented 1 year ago

I am unable to reproduce this behavior on Windows 11 (22621) with any of the templates.

jeremyong commented 1 year ago

I saw a post on reddit with the same behavior reported recently (although my search skills seem to be failing me at the moment). I'm assuming this must be a Windows 10 issue because I can reproduce it immediately with the template linked and no modifications on my end. In my case I'm using Nvidia's 536.40 driver (not that I imagine this to be all that significant).

walbourn commented 1 year ago

I also am unable to reproduce this behavior on Windows 10 (19045) with any of the templates.

It could be a bug with some 'value-add' software thing on the system.

jeremyong commented 1 year ago

Hmm interesting, this is a relatively fresh developer machine, and I don't run "1337-gamer" software that I'm aware of, but I will double check, thanks for confirming.