decacis / godot_oculus_platform

An open-source implementation of the Oculus Platform SDK intended to be used with the Quest platform.
https://decacis.github.io/godot_oculus_platform/
MIT License
19 stars 3 forks source link

PCVR (Rift) support #13

Open Lucky-Mic opened 1 month ago

Lucky-Mic commented 1 month ago

Currently not all available ovr functions are imlemented. Support for Initialize, Entitlement, Message, User and Achievements.

Lucky-Mic commented 1 month ago

In my opinion the initialize_android and initialize_android_async should be renamed to initialize_platform and initialize_platform_async.

decacis commented 1 month ago

Hi Michael! Thank you for this. I haven't had the chance to test this yet, but at first glance it looks good.

There are only two things that I'd like to note:

First is that, I believe we still need the godot_oculus_platform_editor.cpp file. Maybe not for windows anymore, but there might be people that develop on a Mac or use Linux, and when they test from the Godot editor, it's good to at least have autocompletion for the functions and so on.

The other thing I'd like to see if you can do is to move the OVR_PlatformLoader_windows.cpp file maybe to the include folder under a subfolder named windows? Mainly because we have to include the LICENSE.txt file along with whatever comes with the oculus SDK.

Lucky-Mic commented 1 month ago

Hi Daniel, thank you for your response.

Before I change things, I would like to make a few comments. I would be happy if you could give me some feedback, then I will change it according to your wishes.

  1. I don't understand you autocompletion argument, because all functions are also available in godot_oculus_platform_editor.cpp. Currently I use in each function "#ifdef ANDROID" and "#else" for the different implementations. I could also add "#elif defined(_WIN32)" for windows only and "#else" for the rest, which is not supported, like Max or Linux with "return _empty_func_helper();". But if you prefer, I can also reactivate godot_oculus_platform_editor.cpp. Please let me know which one you would like.
  2. REMOVED => Replaced by auto generated OVR_PlatformLoader.os
Lucky-Mic commented 1 month ago
  1. I renamed the initialize_android and initialize_android_async to initialize_platform and initialize_platform_async. Do you agree or should I undo it?
Lucky-Mic commented 1 month ago

Good news: I found a good solution with SCons for your second point:

I changed the SConstruct to generate a src/OVR_PlatformLoader.os from the source demo/addons/godot_oculus_platform/bin/windows/OVR_PlatformLoader.cpp. I checked in this windows directory with LICENSE.txt now. The OVR_PlatformLoader_windows.cpp includes the OVR_PlatformLoader.os now.