GodotVR / godot_openxr

(Maintenance mode) OpenXR drivers for the Godot Game Engine v3.x
MIT License
279 stars 43 forks source link

Godot 3.4.4 Native Vive Focus 3 Support #226

Open Psychophylaxis2 opened 2 years ago

Psychophylaxis2 commented 2 years ago

Hi. I am attempting to run Godot natively on the Vive Focus 3 with the OpenXR demo. Godot 3.4.4 godot_openxr_1.3.0 Godot XR Tools 2.5.0

Following the document to setup as if building for Quest, only changing (following the Vive Unity OpenXR guide): Android Min SDK 25 Android Target SDK 29

The application starts but as a 2D window, then shortly after dies.

Debugger says:

E 0:00:01.130 xr_result: OpenXR Failed to enumerate number of extension properties [] <C++ Source> ../../../../../src/openxr/OpenXRApi.h:351 @ xr_result()

first_person_controller_vr.gd:68 @ initialise() first_person_controller_vr.gd:57 @ _ready() Looking in OpenXRApi.cpp I can see the function call to xrEnumerateInstanceExtensionProperties and subsequent call to xr_result, but its call to xrResultToString doesn't seem to produce an error value inside the square brackets. Which the Khronos document seems to indicate is impossible... Unless anyone has any suggestions as to what's wrong, I will setup a buildable copy of the library to properly debug.
BastiaanOlij commented 2 years ago

Hi @Psychophylaxis2 ,

At the moment, the plugin is currently compiled with Meta's OpenXR loader which only works on the Quest.

Psychophylaxis2 commented 2 years ago

Hi. I'm still pursuing this. However I'm not all that familiar with building on Android and Gradle.. Learning as I go. I have the ovr version building from the source, now figuring out how the build is constructed. The Focus 3 uses the native Khronos loader as I understand it. Any pointers on the android build appreciated. Thanks

BastiaanOlij commented 2 years ago

Hi @Psychophylaxis2,

Sorry for the late response, I've been fully pre-occupied with Godot 4 in recent months.

As the Khronos loader is already part of our repo it should be possible to change the build scripts to switch over to it though the binaries are missing.

That said, I've heard that in theory you could swap out the libopenxr_loader.so file in the meta SDK for the Khronos one and recompile the plugin as is and it should work. Lacking a device to test on I don't know if this is true.

It wouldn't be a full solution however as you're missing out on the Java parts of the Khronos setup and the manifest file would still contain all the Meta related settings and a bunch of those are hardcoded in the Godot 3 core.

We're working on a much more flexible system for Godot 4 which hopefully will have the first parts merged into master soon

latsfro commented 1 year ago

Hi, I am interested to follow up this thread, it has been quite a long time. I think my case is similar to here. I am new to programming in general so apologies in adv.

I am looking to compile an openxr android application that works on quest but bring it over to the Focus 3, the headset I have.

Can you let me know some steps I might need to consider to get it working? Or where might be good to learn about doing this?