- Windows 11 Pro, 64-bit operating system, x64-based processor
- Visual Studio 2022
- Android Studio Chipmunk | 2021.2.1
- Use Visual Studio Installer to get all individual components related to C++ (not just workloads)
- Download the Vulkan SDK installer program for version 1.3.224.1 at https://vulkan.lunarg.com/sdk/home
- Run the installer program and then download every tool, package, etc... (the installer should automatically set/update the VULKAN_SDK, VK_SDK_PATH, and PATH environment variables)
- Allow Unkown Sources in Settings > General in the Oculus PC application
- Allow Developer Runtime Features in Settings > Beta in the Oculus PC application
- Allow Passthrough over Oculus Link in Settings > Beta in the Oculus PC application
- Restart your computer
- Create an organization at https://developer.oculus.com/manage/organizations/create/
- Verify your account at https://developer.oculus.com/manage/verify/
- Enable developer-mode on your Quest2 by turning on the USB Connection Dialog option at Settings > System > Developer
- Download and setup Meta Quest Developer Hub https://developer.oculus.com/downloads/native-android/
- Give permission to access data and allow USB debugging after connecting your headset to your computer using a USB-C cable and putting on the headset
- The Oculus Developer Hub should install the Oculus ADB Drivers but you can also install them with dependencies\oculus-adb-driver-2.0\oculus-go-adb-driver-2.0\usb_driver\android_winusb.inf using Device Manager
- Create a new temporary project in Android Studio and then use the SDK Manager to install the following:
- Android SDK 10.0 (API level 29)
- Android SDK Build Tools (version 33.0.0)
- Android SDK Command-line Tools (version 7.0)
- Android NDK (version 25.1.8937393)
- CMake (version 3.22.1)
- Set the following environment variables:
- JAVA_HOME (JDK location typically at C:\Program Files\Android\Android Studio\jre)
- ANDROID_HOME (Android SDK location typically at C:\Users[username]\AppData\Local\Android\Sdk)
- ANDROID_NDK_HOME (Android NDK location typically at C:\Users[username]\AppData\Local\Android\Sdk\ndk[versionnumber])
- Add the following directories to your PATH:
- JDK tools (typically C:\Program Files\Android\Android Studio\jre\bin)
- Android SDK platform-tools (typically C:\Users[username]\AppData\Local\Android\Sdk\platform-tools)
- Android SDK tools (typically C:\Users<username>\AppData\Local\Android\Sdk\tools)
- Close the temporary project and then open the root level build.gradle file in Android Studio
- Create a new keystore
- In Android Studio, select Build > Generate Signed Bundle / APK
- Select APK
- Select Create new ...
- Enter the required information (do not use "+" for country code)
- Select Next
- Select the release build variant
- Enter your keystore information into the auto-generated keystore.properties file located in the root directory
- Select File > Sync Project with Gradle Files
- Use the command
adb shell setprop debug.oculus.loadandinjectpackagedvvl.com.tom.bomberman_xr.debug 1
from an Oculus Developer Hub custom command or a command prompt (this MUST be run every time the headset is reset)
* Open the project in Visual Studio with the bomberman_xr.sln file and in Android Studio with the build.gradle file at the root level
- It's a right-handed coordinate system (+X right, +Y up, -Z forward)
- Positive rotation is counterclockwise about the axis of rotation
- The units for all linear distances are meters
- The texture coordinates (0, 0) correspond to the upper left corner of the image
- Select Tools > Customize...
- In the Commands tab, select Toolbar: then Standard in corresponding drop-down list
- Select Solution Configurations and then Modify Selection
- Make sure the source file is located in shaders/glsl/
- Right-click the "bomberman_xr" project and select Add > Existing Item... then select the source file
- Right-click the source file in the Solution Explorer and select Properties
- Select the debug configuration for your target platform(s)
- Set the Item Type property to Custom Build Tool then select Apply
- Select the Custom Build Tool property that just appeared under General
- Set the Command Line property to
glslc.exe %(Identity) -mfmt=num -o "$(SolutionDir)shaders\glsl\bin\debug\%(Filename)%(Extension)".spv
- Set the Description property to
Compiling shader %(Identity) to $(SolutionDir)shaders\glsl\bin\debug\%(Filename)%(Extension).spv
- Set the Outputs property to
$(SolutionDir)shaders\glsl\bin\debug\%(Filename)%(Extension).spv
- Set the Link Objects property to No
- Select Apply
- Select the release configuration for your target platform(s)
- Set the Command Line property to
glslc.exe %(Identity) -O -mfmt=num -o "$(SolutionDir)shaders\glsl\bin\release\%(Filename)%(Extension)".spv
- Set the Description property to
Compiling shader %(Identity) to $(SolutionDir)shaders\glsl\bin\release\%(Filename)%(Extension).spv
- Set the Outputs property to
$(SolutionDir)shaders\glsl\bin\release\%(Filename)%(Extension).spv
- Set the Link Objects property to No
- Select Apply
- Set the Command Line property to
* If loading SPIR-V code as a binary file (not as a list of comma-separated 32-bit hex integers) then remove -mfmt=num
from the Command Line property
- Rest-pose, Bind-pose, and T-pose are all assumed to be equal
- All non-skinned meshes will be have their pivot automatically set to their center when loaded from a file
- All skinned meshes will be have thier pivot automatically set to their skeleton's root when loaded from a file
- A skinned mesh's bounding volume may need to be increased if animated
- Visual Studio must be run as administrator to use the Optick profiler
- You have to select File > Sync Project with Gradle Files if you change a build.gradle file (and possibly the CMakeLists.txt and AndroidManifest.xml files as well)
- I didn't need to run the following commands but if Vulkan validation layers are not working you can try running
adb shell setprop debug.vvl.forcelayerlog 1
and thenadb logcat -s VALIDATION
- Android Studio automatically signs your app with a debug certificate for debug builds. The debug certificate has an expiration date of 30 years from its creation date and you will have delete the debug.keystore file most likely stored at C:\Users\user\.android\
- I get some unsettling logs while running the debug build. I am unsure if they are my fault and I have been ignoring them. You can view them here