bgfx
bgfx copied to clipboard
OpenVR support
Thanks for this powerfull renderer layer ..
Is possible support OpenVR api ? ( Include all VR' S in One )
It is possible, just it's not supported right now.
I'd like to look at this and have started this in relation to LumixEngine...
Some work already started: OpenVR by @mendsley
3 things:
- It uses the compositor which might tread on how much your app wants to do that part or just give control to OpenVR.
- This is DX11 only for now, might need to make a better way of detecting and using other APIs
- Using the C++ bindings when the C-API should be used so we can dynamically load in the lib and not link to it at compile time (some scary info on the net where the C-API is a bit lousy though so I'll hold off from now until I get the actual thing working)
Also it doesn't compile out of the box when you rebase it on the latest BGFX so probably the base HMD struct/header has changed, need to investigate that.
My branch will be here
Cheers
Can you update that branch to latest? Not being able to dynamically loads means it has to be build configuration --with-openvr
. Overall sounds reasonable. No need to complete anything it could be just considered WIP.
Yep updated the branch to latest @bkaradzic
Hey @bkaradzic
Just after some advice, I've got this in getInternalData: https://github.com/boberfly/bgfx/blob/openvr/include/bgfx/platform.h#L75
But I'm thinking this might not be a good idea calling this after bgfx::init on the main/game thread when the renderer thread owns it. I still need to work out if I can call getWaitPoses from OpenVR from separate threads and twice a frame (one in the game code to get transforms) and then in bgfx right before the render submission...
Hello —
I may be interested in collaborating to improve OpenVR support. I'm thinking about migrating my project SoundSelf from OpenGL 3.1 to BGFX.
Re: @boberfly, I realize this is a late reply but OpenVR provides a separate transform for use in the next game frame. You could ringbuffer it over to the game engine.
Hi there, has there been any more recent progress on this (or OpenXR support)?