Sour wrote:I can only assume Windows is doing some sort of voodoo magic to prevent screen tearing in windowed mode.
Since Aero was introduced (i.e. Windows Vista) the Windows UI manager has had the ability to vsync the display of composited windows for you. In this mode there's no way for the application to control whether or not vsync applies. As always with Windows, if the application is not in true exclusive fullscreen mode any use of a vsync API is a placebo. (This includes the popular "borderless window that covers the whole screen" alternative to true fullscreen.)
If you've ever seen "do you want to change the color scheme to improve performance" pop up, that fallback mode lacks a global vsync, and you can see tearing there, if you like.
As for whether Direct3D adds 3 frames of lag, I mean, it's quite possible that it does on DRW's system right now, but it doesn't
have to and it's not designed to (I've measured very good latency with it in the past), but there's a bunch of links in the chain between application and display (keyboard > keyboard drivers > windows > application > windows > GPU drivers > GPU > monitor) and
any of these could be configured in a way that adds unnecessary lag. Most of these aren't directly under the control of the application at all.
If the situation on your system is that true fullscreen performs more poorly than Aero's globally vsynced windows compositing, something is sadly out of order. The whole point of fullscreen is to allow the application direct and low latency control of the screen.
Most likely I'd suspect the GPU driver here, but like I said there's a lot of links in this chain.
We have had a discussion very close to this a few times before, here's one I remember:
https://forums.nesdev.com/viewtopic.php?f=5&t=14743 "Please explain to a layman: input lag"