Open morallo opened 4 years ago
Hey @Prof-Butts I am giving this a try, and I could use some hints.
First problem: to initialize the XrInstance, I need a pointer to the D3DDevice, which is a member of DeviceResources. But the deviceResources instance is only created when the app calls DirectDrawCreate(), and not available at the time dllmain is executed, where other initialization routines are run (for example SteamVR).
Should we implement the initialization of VR resources in DeviceResources::Initialize() instead of dllmain?
Yeah, I think that's the right call. Just protect the initialization with some global variable (like g_bUseOpenXR) and maybe try creating a new branch because I've got the feeling several things might break while we work on this.
Yep, already created it :-) This is more an experiment than anything, for now. I will let you know if I manage to make it work.
I'm confident you'll make it work. So, it's a matter of "when", not "if" ;)
I'm also curious about one thing: do we still have to deal with something similar to WaitGetPoses() and the associated penalty in performance?
On Mon, Feb 8, 2021 at 12:31 PM Marcos Orallo notifications@github.com wrote:
Yep, already created it :-) This is more an experiment than anything, for now. I will let you know if I manage to make it work.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Prof-Butts/xwa_ddraw_d3d11/issues/24#issuecomment-775432658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK2FAIIXLO5RGJSXLT6OO3S6BCYNANCNFSM4OU5DPAA .
Yes, all VR runtimes have the same concept, to minimize latency. In OpenXR there is xrWaitFrame and xrBeginFrame. I hope that the implementation is more flexible and consistent than in openvr. Oculus SteamVR support was really weird for this.
Because why not? 😄
https://www.khronos.org/openxr/
It's phasing out OpenVR as the official API for SteamVR. Also, it would allow to support Oculus and WMR runtimes directly without needing SteamVR.