OpenXR's XR_FB_display_refresh_rate extension only returns 60Hz and 72Hz for Quest 2
Built OpenXR SDK 1.1.38 from source, using that for a native Android application using a custom engine. xrEnumerateDisplayRefreshRatesFB only returns 60 and 72 Hz, and trying to request 90Hz using xrRequestDisplayRefreshRateFB returns XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FBSolved1.1KViews1like2CommentsOur game won't get past loading screen in Quest
Hi Guys. For the last few days I've not been able to get our game to launch natively in VR in the Quest and I'm wondering what types of topics I should be looking into. I can build in Unreal 4.27.2 Meta Fork v57, and it was all working last Wednesday lunchtime. I can upload the APK successfully to the Quest 2 and 3, and both fail to get past the initial loading screen and return to the main Quest menu/lobby. I have tried going back in Gitlab/GitHub to the last day it worked with a dedicated branch and I did manage to get one successful build to launch in the Quest, but unfortunately I am not really sure which setting made it work and when I try to reproduce it again it fails. The last setting I changed was moving it from 'Shipping' to 'Development' so I thought it was that, but it appears not. Since then I've been trying Git branches from different days with various settings I know I played with when it did work, and haven't had any luck. I'm now trying to see if I get a Vanilla VR Template from Epic to build, and having trouble getting it to copy the APK to the headset (fails with the red bar in HUB) but that's never surprising as any initial project setup always takes some noodling to get it to work. The upgrade to Meta Fork 4.27.2 v57 was fairly recent but it has been working for a couple of weeks. The only other change was integrating FMOD into our pipeline and that we got working as well for a couple of days. I've looked into that, but it's hard to eliminate it as a related issue. Any clues would be appreciated. Thank you.1KViews0likes1CommentUE5 (.2.1) Had some problems building to Quest (3) and VR Preview: Solved!
Besides the documentation, this is my config which works finally: Download via Android Studio (Tools - SDK-Manager) SDK Platforms (check "Show Package Details"): Android 12L -> Android SDK Platform 32, Sources for Android 32, ARM 64 v8a Android 10 -> Android SDK Platform 29, Sources for Android 29, ARM 64 v8a SDK Tools (check "Show Package Details"): Android SDK Build-Tools 34 -> 32.1.0-rc1, 32.0.0, 29.0.3 NDK -> 25.1.8937393 Android SDK Command-line Tools -> Android SDK Command-line Tools 11.0, 10.0 Android Emulator Android Emulator Hypervisor Driver Android SDK Platform Tools Unreal Engine Project Settings: Android SDK: Min SDK: 29 Target SDK: 32 NDK: 25.1.8937393 (26.x doesnt work) JAVA: JAVA SE 8 (https://www.oracle.com/de/java/technologies/javase/javase8-archive-downloads.html) SDK API Level: android-32 NDK API Level: android-29 SDK Paths: Location Android SDK: C:/Users/[Username]/AppData/Local/Android/Sdk Location Android NDK: C:/Users/[Username]/AppData/Local/Android/Sdk/ndk/25.1.8937393 Location JAVA: C:/Program Files/Java/jdk1.8.0_202 Settet these Paths also in the environment variables ANDROID_HOME, NDKROOT, JAVA_HOME VR Preview: I had problems getting the VR Preview to work. While trying the XR Simulartor, i settet the Environment-Variable "XR_RUNTIME_JSON". Had to remove that, because the path doesnt exist anymore (deleted the MetaXRSimulator-Folder and did not remove this variable) This tool https://github.com/maluoi/openxr-explorer should show the active runtime (oculus). With the wrong environment-variable, openxr-explorer shows "no runtime settet" or something like that. This tool shows errors, if something is wrong Start Oculus Link before Unreal Editor3.8KViews2likes4CommentsBuild Error - Script Debugging
Using Unity3d 2021.3.27 Oculus Package v56 Build process fails when I set the ScriptDebugging flag on; with the following error: Building Library\Bee\artifacts\Android\d8kzr\libil2cpp.so failed with output: Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `il2cpp::os::PathErrnoToErrorCode(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, int)': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/Error.cpp:227:(.text._ZN6il2cpp2os20PathErrnoToErrorCodeERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi+0x54): relocation truncated to fit: R_AARCH64_CALL26 against symbol `access@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `std::__ndk1::_DeallocateCaller::__do_call(void*)': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/include/c++/v1/new:334:(.text._ZN6il2cpp2os20PathErrnoToErrorCodeERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEi+0x70): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)' defined in .text._ZdlPv section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o) Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `PosixAutoLock': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:44:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x14): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_mutex_lock@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `il2cpp::os::EventImpl::Set()': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/EventImpl.cpp:26:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x2c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_cond_broadcast@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `~PosixAutoLock': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:46:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x34): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_mutex_unlock@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:46:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x50): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_mutex_unlock@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x58): relocation truncated to fit: R_AARCH64_CALL26 against symbol `_Unwind_Resume' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x\libgcc_real.a(unwind-dw2.o) C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:46:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x5c): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__clang_call_terminate' defined in .text.__clang_call_terminate[__clang_call_terminate] section in Library/Bee/artifacts/Android/d8kzr/yilyaeoth72i.o C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:46:(.text._ZN6il2cpp2os9EventImpl3SetEv+0x60): relocation truncated to fit: R_AARCH64_CALL26 against symbol `__clang_call_terminate' defined in .text.__clang_call_terminate[__clang_call_terminate] section in Library/Bee/artifacts/Android/d8kzr/yilyaeoth72i.o Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `PosixAutoLock': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:44:(.text._ZN6il2cpp2os9EventImpl5ResetEv+0x14): relocation truncated to fit: R_AARCH64_CALL26 against symbol `pthread_mutex_lock@@LIBC' defined in .text section in C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/../sysroot/usr/lib/aarch64-linux-android/22/libc.so Library/Bee/artifacts/Android/87lik/2bu4ed5r2ps3.o: In function `~PosixAutoLock': C:/Program Files/Unity/Hub/Editor/2021.3.27f1/Editor/Data/il2cpp/libil2cpp/os/Posix/PosixHelpers.h:46:(.text._ZN6il2cpp2os9EventImpl5ResetEv+0x20): additional relocation overflows omitted from the output clang++: error: linker command failed with exit code 1 (use -v to see invocation) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) Anyone seen something like this?1.3KViews0likes0CommentsCorrect SDK and NDK to target for Oculus Quest 1 and 2 (oculus-4.26.1-release-1.59.0-v27.0 branch)
I am creating a VR project using the oculus-4.26.1-release-1.59.0-v27.0 branch of Unreal Engine. I have done the default Android setup as mentioned in Unreal Documentation. I have also added the paths to the SDK, NDK and JAVA in the "Android SDK" section of "Project Settings" Now, my questions are, What values should I put in the "SDK API Level" and "NDK API Level" in the Android SDK section of Project Settings? What values should I put in the "Minimum SDK Version" and "Target SDK Version" in the Android section of "Project Settings"? Do I need to download any other version of Android SDK or NDK using Android Studio? I currently have Android API 30 and 29(Android 10.0(Q)) SDK installed. For NDK, I have 21.1.6352462 Installed. I have searched for answers regarding these questions everywhere and all the posts about these are out of date. Any help will be appreciated!1.6KViews0likes0CommentsHow to correctly use SRGB on Oculus Mobile Native (C++)?
This is a Go+Quest question. I have a Oculus Mobile C++ app forked from the VRCubeWorld_NativeActivity example in the Oculus Mobile native SDK. I hooked in my own code in `ovrRenderer_RenderFrame`, so right after the framebuffer and the eye matrices are set up I call my own rendering code. This rendering code is shared with desktop, it enables `GL_FRAMEBUFFER_SRGB` and it exclusively draws the SRGB color space. I am trying to figure out how to convert VRCubeWorld_NativeActivity from RGB to SRGB. I want the SRGB drawn by my rendering code to be correctly treated by the NativeActivity.cpp's framebuffer and EGL surface. I have found a way that "works" (I see the colors I expect) but I do not know if it is correct. You can see my exact NativeActivity code here (it is open source). What I did: Pass `GL_SRGB8_ALPHA8` instead of `GL_RGBA8` in ovrFramebuffer_Create Set `VRAPI_MODE_FLAG_FRONT_BUFFER_SRGB` in `parms.flags` when we call `vrapi_EnterVrMode`() What I did NOT do— because I tried these things and they had no effect: Call `setEGLattrib(EGL_GL_COLORSPACE_KHR, EGL_GL_COLORSPACE_SRGB_KHR);` after calling `eglCreateContext()` (I think we do this in our glfw version, and it is recommended in a long comment in VrApi_Types.h). Comment out the many `VRAPI_FRAME_LAYER_FLAG_INHIBIT_SRGB_FRAMEBUFFER` lines left over from the sample code. What I need to know: Am I doing something wrong or unsafe, or incurring any penalty (like unnecessary conversions RGB->SRGB and back again) by failing to explicitly set the EGL_GL_COLORSPACE_SRGB_KHR egl attrib? What do the various VRAPI_FRAME_LAYER_FLAG_INHIBIT_SRGB_FRAMEBUFFER flags do? What does this "layer" code (the "black layer" and "loading icon layer") do, and can I safely remove it? (I have removed a lot of the code from the NativeActivity example because I was sure I did not need it, but there are other parts I did not understand so I have left it in. Because there is not really any comments/documentation on the sample code it is hard to tell what is necessary and what Oculus merely left for us as a convenience.)1.9KViews1like2CommentsWhy it seems it's not possible to use CPP in the NDK sources ?
Hi, I am still messing up with code and trying to get my things work. My stuff is entirely done in CPP however I noticed all sources in the NDK samples are plain C-99 .. If I take the VrCubeWorld_Vulkan sample and I try to add to the project a simple "Banana.cpp" file that contains as simple as : #include <stdio.h> #include <stdbool.h> bool InitWorld (void *p) { return true; } Then I modify the Android.mk file as : LOCAL_MODULE := vrcubeworldvk #LOCAL_CFLAGS := -std=c99 -Werror LOCAL_SRC_FILES := ../../../Src/VrCubeWorld_Vulkan.c \ ../../../Src/Banana.cpp \ ../../../Src/Framework_Vulkan.c And then from within I call : extern bool InitWorld (void *p); void android_main( struct android_app * app ) { ALOGV( "----------------------------------------------------------------" ); ALOGV( "android_app_entry()" ); ALOGV( " android_main()" ); InitWorld("Pappinone"); When I try to compile it spews those sort of errors : Build command failed. Error while executing process /home/gilesgoat/Android/Sdk/ndk/20.1.5948944/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/jni/Android.mk NDK_APPLICATION_MK=/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/jni/Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/build/intermediates/ndkBuild/debug/lib V=0 -j4 -C/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android APP_PLATFORM=android-21 NDK_TOOLCHAIN_VERSION=clang APP_STL=c++_static NDK_DEBUG=1 OVR_DEBUG=1 USE_ASAN=1 /home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libvrcubeworldvk.so} make: Entering directory `/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android' [arm64-v8a] Compile : vrcubeworldvk <= VrCubeWorld_Vulkan.c [arm64-v8a] Compile++ : vrcubeworldvk <= Banana.cpp [arm64-v8a] Compile : vrcubeworldvk <= Framework_Vulkan.c [arm64-v8a] Prebuilt : libvrapi.so <= /home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/jni/../../../../../VrApi/Projects/AndroidPrebuilt/jni/../../../Libs/Android/arm64-v8a/Debug/ [arm64-v8a] StaticLibrary : libandroid_native_app_glue.a [arm64-v8a] SharedLibrary : libvrcubeworldvk.so /home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/objs-debug/vrcubeworldvk/__/__/__/Src/VrCubeWorld_Vulkan.o: In function `android_main': /home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/jni/../../../Src/VrCubeWorld_Vulkan.c:1429: undefined reference to `InitWorld' clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android/build/intermediates/ndkBuild/debug/obj/local/arm64-v8a/libvrcubeworldvk.so] Error 1 make: Leaving directory `/home/gilesgoat/OVR-SDK-Mobile/VrSamples/VrCubeWorld_Vulkan/Projects/Android' If I "transform" all in .cpp gets even worse, it cannot find all the ovrVK... functions. Is any way to "properly MIX" cpp and C in the VRAPI samples or the only solution would be to "confine" all the CPP code into a precompiled lib and call the few needed functions via some C wrapper ? Why the examples do not support CPP ? If that Banana.cpp is renamed in Banana.c all works ( but you can't use CPP stuff in ). Cheers.795Views0likes1CommentAny project template for Android Studio for NDK ?
Hi, I am still not sure how all that works but could be in a future a request for a "Project Template" where you go like "New project -> Oculus NDK" and gives you a "base" to start with ? Clearly Android Studio appears to have support for something like that. Thanks in advance.425Views0likes0CommentsUnity for GearVR.. setting up, errors, failed builds
Hi there, I am trying to learn how to make a VR app for the GearVR from Windows 10 (Unity 2018.2.15f1) to Samsung Galaxy A8. Doing tutorial https://developer.oculus.com/documentation/unity/latest/concepts/unity-tutorial/ however no success to make my USB-plugged phone react, nor being able to build even an .apk. If I simply Run the scene in the Unity, it spits out a Warning: Virtual Reality SDK Oculus failed to initialize. Will attempt to enable None instead. Even if I switch on Settings ->Apps ->GearVR Service ->Storage ->Manage Storage ->Developer Mode ON on my phone. When Building (see image): the Gradle-build-failed error claims some existing toolchains for the linux are missing.. wait, what linux? Even the Preferences->External Tools point to the NDK directory where the aforementioned are present, twice. I have installed/uninstalled several times all those SDKs (Java, Android, Oculus Integration, Samsung), an obsolete NDK#13 (Android) - command line, GUI, ..and don't even remember what tools, in hopes to solve this. My phone has Oculus and GearVR apps running and Developer mode activated, and has a legal device status when adb -devices. USB drivers are there. Not building. What else parts am I missing? My desperate pleas for the assistance. Neil878Views0likes1Comment