@cmuratori I have a question that unfortunately was too late for handmade hero today: In windows, window movement has 0 latency compared to the hardware mouse cursor. It follows pixel perfect. How does it do that? My own imgui has visible latency with vsync off and 0.2 ms frames.
There is no "increased latency" in either case, it is just an update timing problem. Since Windows is updating the cursor when _it_ wants, it can guarantee that the update doesn't happen in the middle of _its_ frame, but it can't do that for _your_ frame. Make sense?
-
-
You can improve the situation for yourself by polling for the mouse more aggressively, and doing it right at the very end of everything you do, so it's as close to the SwapBuffers/Present as possible. But you can't do what Windows does, which is make sure that it's never off.
-
Makes sense! I phrased that badly, I didn't mean to say that the cursor had increased latency, only that it would show the actual application latency, which is always more than windows' latency. Pushing everything close to Present would be less effective, the shorter my frames...
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.