diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml index 20f4424..f2d8a14 100644 --- a/.github/workflows/build-on-push.yml +++ b/.github/workflows/build-on-push.yml @@ -21,8 +21,8 @@ jobs: platform: linux - os: windows-latest platform: windows - - os: macOS-latest - platform: osx + # - os: macOS-latest + # platform: osx # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -41,10 +41,10 @@ jobs: pip install scons if: matrix.os == 'windows-latest' - - name: Install scons (macOS) - run: | - brew install scons - if: matrix.os == 'macos-latest' + # - name: Install scons (macOS) + # run: | + # brew install scons + # if: matrix.os == 'macos-latest' - name: Run the build for godot-cpp run: | @@ -79,14 +79,14 @@ jobs: openvr/bin/linux64/libopenvr_api.so if: matrix.os == 'ubuntu-18.04' - - name: Upload build files (artifacts) (macOS) - uses: actions/upload-artifact@v2 - with: - name: build-files-macos - path: | - demo/addons/godot-openvr/bin/osx/libgodot_openvr.dylib - openvr/bin/osx64/OpenVR.framework - if: matrix.os == 'macos-latest' + # - name: Upload build files (artifacts) (macOS) + # uses: actions/upload-artifact@v2 + # with: + # name: build-files-macos + # path: | + # demo/addons/godot-openvr/bin/osx/libgodot_openvr.dylib + # openvr/bin/osx32/OpenVR.framework + # if: matrix.os == 'macos-latest' - name: Upload build files (artifacts) (Windows) uses: actions/upload-artifact@v2 @@ -123,8 +123,8 @@ jobs: cp -r godot_openvr/demo/addons/godot-openvr addons/godot-openvr cp build-files-linux/demo/addons/godot-openvr/bin/x11/libgodot_openvr.so addons/godot-openvr/bin/x11/libgodot_openvr.so cp build-files-linux/openvr/bin/linux64/libopenvr_api.so addons/godot-openvr/bin/x11/libopenvr_api.so - cp build-files-macos/demo/addons/godot-openvr/bin/osx/libgodot_openvr.dylib addons/godot-openvr/bin/osx/libgodot_openvr.dylib - cp -r build-files-macos/openvr/bin/osx64/OpenVR.framework addons/godot-openvr/bin/osx/OpenVR.framework + # cp build-files-macos/demo/addons/godot-openvr/bin/osx/libgodot_openvr.dylib addons/godot-openvr/bin/osx/libgodot_openvr.dylib + # cp -r build-files-macos/openvr/bin/osx32/OpenVR.framework addons/godot-openvr/bin/osx/OpenVR.framework cp build-files-windows/demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll addons/godot-openvr/bin/win64/libgodot_openvr.dll cp build-files-windows/openvr/bin/win64/openvr_api.dll addons/godot-openvr/bin/win64/openvr_api.dll - name: Calculate GIT short ref diff --git a/README.md b/README.md index 3a53ebe..0f0bba7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,8 @@ https://support.microsoft.com/en-au/help/2977003/the-latest-supported-visual-c-d Mac notes --------- -Mac is currently untested, I unfortunately do not have the required hardware. If anyone wants to hold up their hands, please contact me :) +Valve has dropped support for MacOS in the latest version of OpenVR/SteamVR. While a 32bit binary is still included we have not been able to get this to work. +If you have a Mac and are willing to investigate this issue we would welcome a PR with the required fixes but otherwise support of MacOS has been dropped. Linux notes ----------- diff --git a/SConstruct b/SConstruct index 885db8d..450f0b1 100644 --- a/SConstruct +++ b/SConstruct @@ -20,7 +20,7 @@ opts.Add(BoolVariable('use_llvm', "Use the LLVM / Clang compiler", 'no')) opts.Add(EnumVariable('bits', "CPU architecture", '64', ['32', '64'])) # Other needed paths -godot_headers_path = "godot-cpp/godot_headers/" +godot_headers_path = "godot-cpp/godot-headers/" godot_cpp_path = "godot-cpp/" godot_cpp_library = "libgodot-cpp" @@ -43,7 +43,7 @@ platform_dir = '' if env['platform'] == 'windows': env['target_path'] += 'win' + env['bits'] + '/' godot_cpp_library += '.windows' - platform_dir = 'win' + platform_dir = 'win' + str(env['bits']) if not env['use_llvm']: # This makes sure to keep the session environment variables on windows, # that way you can run scons in a vs 2017 prompt and it will find all the required tools @@ -66,7 +66,7 @@ if env['platform'] == 'windows': elif env['platform'] == 'osx': env['target_path'] += 'osx/' godot_cpp_library += '.osx' - platform_dir = 'osx' + platform_dir = 'osx32' # on OSX this is a universal binary if env['target'] in ('debug', 'd'): env.Append(CCFLAGS = ['-g','-O2', '-arch', 'x86_64']) else: @@ -77,7 +77,7 @@ elif env['platform'] == 'osx': elif env['platform'] in ('x11', 'linux'): env['target_path'] += 'x11/' godot_cpp_library += '.linux' - platform_dir = 'linux' + platform_dir = 'linux' + str(env['bits']) if env['target'] in ('debug', 'd'): env.Append(CCFLAGS = ['-fPIC', '-g3','-Og', '-std=c++17']) else: @@ -108,14 +108,11 @@ env.Append(CPPPATH=[ env.Append(LIBPATH=[godot_cpp_path + 'bin/']) env.Append(LIBS=[godot_cpp_library]) -# Add our openvr library -platform_dir += str(env['bits']) - if (os.name == "nt" and os.getenv("VCINSTALLDIR")): env.Append(LIBPATH=[env['openvr_path'] + 'lib/' + platform_dir]) env.Append(LINKFLAGS=['openvr_api.lib']) elif env['platform'] == "osx": - env.Append(LINKFLAGS = ['-F' + env['openvr_path'] + 'bin/osx64', '-framework', 'OpenVR']) + env.Append(LINKFLAGS = ['-F' + env['openvr_path'] + 'bin/osx32', '-framework', 'OpenVR']) else: env.Append(LIBPATH=[env['openvr_path'] + 'lib/' + platform_dir]) env.Append(LIBS=['openvr_api']) diff --git a/demo/addons/godot-openvr/CHANGES.md b/demo/addons/godot-openvr/CHANGES.md index fc66236..575dc26 100644 --- a/demo/addons/godot-openvr/CHANGES.md +++ b/demo/addons/godot-openvr/CHANGES.md @@ -6,7 +6,8 @@ More frequent updates may be available on the source repository. 1.1.0 - In progress ------------------- -- Build for Godot 3.2 +- Build for Godot 3.3 +- Now using OpenVR 1.16.8 (drops MacOS support) - Added support for actions - Added support for request play area - Added skeleton support (finger tracking) diff --git a/demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll b/demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll index fd9562f..f93192f 100644 Binary files a/demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll and b/demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll differ diff --git a/godot-cpp b/godot-cpp index c9a740b..d68e629 160000 --- a/godot-cpp +++ b/godot-cpp @@ -1 +1 @@ -Subproject commit c9a740be34438ce999402b7b76304a38daaaa811 +Subproject commit d68e629a7cb93a6be73391d87be060eeb72d9d7a diff --git a/openvr b/openvr index 39205f6..4c85abc 160000 --- a/openvr +++ b/openvr @@ -1 +1 @@ -Subproject commit 39205f6b281a6131d1373d0217c1ab9ed19735ea +Subproject commit 4c85abcb7f7f1f02adaf3812018c99fc593bc341 diff --git a/src/ARVRInterface.cpp b/src/ARVRInterface.cpp index 2b7661f..d0260e6 100644 --- a/src/ARVRInterface.cpp +++ b/src/ARVRInterface.cpp @@ -329,6 +329,21 @@ void godot_arvr_notification(void *p_data, int p_what) { // nothing to do here for now but we should implement this. } +//////////////////////////////////////////////////////////////// +// Return the camera feed that should be used for our background +// when we're dealing with AR. +int godot_arvr_get_camera_feed_id(void *) { + + return 0; +} + +//////////////////////////////////////////////////////////////// +// Return a texture ID for the eye if we manage the depth buffer +int godot_arvr_get_external_depth_for_eye(void *p_data, int p_eye) { + + return 0; +} + //////////////////////////////////////////////////////////////// // Structure to provide pointers to our interface functions. const godot_arvr_interface_gdnative interface_struct = { @@ -350,5 +365,8 @@ const godot_arvr_interface_gdnative interface_struct = { godot_arvr_process, // only available in Godot 3.2+ godot_arvr_get_external_texture_for_eye, - godot_arvr_notification + godot_arvr_notification, + godot_arvr_get_camera_feed_id, + // only available in Godot 3.3+ + godot_arvr_get_external_depth_for_eye };