Closed phr00t closed 5 years ago
Should be done with this commit: https://github.com/phr00t/xenko/commit/3853a47e7d0f73ba96f32279c234989ffce1d18b
However, needs proper testing.
Lots of OpenVR code in Xenko is not built due to compiler flags requiring DirectX11... work in progress
Looks like there is no Vulkan equivalent for getting a mirror texture...?
This commit: https://github.com/phr00t/xenko/commit/b20e0e54125b9cde95bcec9b23f02808968a0be1
Allows OpenVR to build for Vulkan. However, openvr_api.dll doesn't get copied automatically to the win-vulkan/x64 library folder of a built project for some reason... also, I don't think texture.SharedHandle is functional as the Vulkan texture pointer
I have SharedHandle being set, but it looks like there is more required here:
This sets SharedHandle:
https://github.com/phr00t/xenko/commit/e3c9e32b0602a4788406600a5b02debea4bfcb5a
...but lots of stuff needs to be done according to the wiki above
Significant progress: https://github.com/phr00t/xenko/commit/3a87b36e5785e2bf526083cfd9b0a602a99142b5
Currently compiling & running. The OpenVR.Submit function is getting a compositor error that the app doesn't have focus, which is happening because WaitGetPoses isn't being called. This is because the VR system isn't being drawn, because it is considered disabled and not visible when checked in GameSystemsCollection.cs line 126
Why is it disabled? Not sure, but that is the next thing to fix...
Got some useful information from the vrclient_
Now OpenVR & Vulkan WORKS!
OpenVR seems to work on DirectX textures:
https://github.com/phr00t/xenko/blob/master/sources/engine/Xenko.VirtualReality/OpenVR/OpenVR.cs#L232
Vulkan should be used instead.
However, can't make much progress on this until this issue is resolved: https://github.com/xenko3d/xenko/issues/370