Window drag stutter when using Direct X #10412
Replies: 2 comments 2 replies
-
I always use CompositionTarget_Rendering to render Direct2D and I did not meet this problem (I had uploaded some test samples in my GitHub directory) |
Beta Was this translation helpful? Give feedback.
-
I've only just switched from D3d11 to D3d12 so it's possible that my synchronization code is wrong and causing the stutter. I'm currently rendering on the UI thread. When I was using D3d11 with WinUI years ago, I think I would put the swap-chain rendering and also the swap-chain input on background threads. There are instructions for UWP in the docs regarding the use of 'independent input source' concept with the UWP swap-chain. As for putting the rendering on a background thread. I can't quite remember what I did, I think the case is that the swap-chain must be created on the UI thread, but after that, rendering can be done from a background thread. If that's how it should be done, that's almost fine, but the one thing I don't like about that is that the UI is then out of sync with the swap-chain. It's quite noticeable when you drag something, and the object is not under the mouse. Almost by definition, the UI and content must be rendered on the same thread. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is anyone aware of an issue with dragging windows while rendering direct-x content? I don't know if we are not meant to use CompositionTarget_Rendering. But if I do this...
The window can't be dragged around properly, it's really bad. And I'm pretty sure the application crashed one time while I was dragging it around.
Beta Was this translation helpful? Give feedback.
All reactions