Prof-Butts / Hook_XWACockpitLook

X-Wing Alliance mouse hook with support for VR head-tracking
6 stars 1 forks source link

Call WaitGetPoses() from CockpitLook for better latency #7

Closed morallo closed 3 years ago

morallo commented 3 years ago

Necessary changes in CockpitLook for https://github.com/Prof-Butts/xwa_ddraw_d3d11/pull/41

It calls WaitGetPoses() from CockpitLook hook to do the frame sync and reduce the latency, as this is the first place in the frame where the pose is needed.

The drawback is that this placement is not optimal in terms of performance. It creates a big GPU bubble because xwingalliance.exe will not start sending draw calls until much later in the frame (when calling ddraw.dll::Direct3DDevice::Execute())