Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd Resize Behavior of example_win32_directx12 #5274

Closed
PaltryProgrammer opened this issue May 2, 2022 · 3 comments
Closed

Odd Resize Behavior of example_win32_directx12 #5274

PaltryProgrammer opened this issue May 2, 2022 · 3 comments

Comments

@PaltryProgrammer
Copy link

Greetings Kind Regards Thank You for providing ImGui Upon download today of latest version and build and run project "example_win32_directx12" its behavior upon resize is odd as demonstrated in attached GIF. The DirectX version on my system is !2. The other "example_win32_directxXX" do not exhibit this odd behavior. - Cheerio
Microsoft Windows 10 Home (x64) Build 19044.1645 (21H2)
example_win32_directx12 odd behavior upon resize

@PathogenDavid
Copy link
Contributor

The stretching is "normal", that's just a change in behavior between DirectX 11 and DirectX 12 when the size of the swap chain doesn't match the window.

The lagging is definitely not ideal though and does not happen on my machine. The only thing happening in WM_SIZE is a queue flush and resizing the swapchain. (Same as the D3D10/D3D11 examples, although the flush is only implied on them.)

Are your graphics drivers up-to-date?

In Visual Studio, if you go to Debug > Windows > Modules do you see any DLL's that aren't from C:\Windows\? Do you see anything from C:\Windows\System32\DriverStore\ that isn't from your GPU vendor? (If you aren't sure, you can select the entire list and copy+paste it to a GitHub Gist.)

@PaltryProgrammer
Copy link
Author

PaltryProgrammer commented May 2, 2022

@ocornut
Copy link
Owner

ocornut commented May 3, 2022

This is a frequently asked thing but unfortunately it's not related to Dear ImGui it's an app thing and is the default behavior on Windows (resizing or moving a Windows window is BLOCKING the app by default).

Searching for WM_SIZE or WM_TIMER yield other of the same topics, including #4516 #3672 #3498 #5061

You can probably find workarounds on stackoverflow or elsewhere.

We may want to try to make our examples handle that nicely, would be open to PR but only if it didn't make the examples too complex or extra noisy. I haven't tried yet. Perhaps an alternative solution if the solution is too noisy would be to leave comments giving some pointers or a link about how to solve it.

It would be interesting to know what the lagging is and if there's any way the examples and/or backend code could mitigate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants