Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-android-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
jobs:
build:
name: Android Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
os: [ubuntu-24.04]
target: [android]
graphics: [VULKAN, OPENGL_ES]
chapter: [Chapter1, Chapter2, Chapter3, Chapter4, Chapter5]
Expand All @@ -27,4 +27,3 @@ jobs:
cd ${{ matrix.chapter }}
chmod 755 gradlew
./gradlew assembleDebug

2 changes: 1 addition & 1 deletion .github/workflows/build-common-archs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-eoc-archs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-host-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
os: [ubuntu-24.04]
target: [linux]
graphics: [VULKAN, OPENGL]
steps:
Expand All @@ -22,7 +22,7 @@ jobs:
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev libgl1-mesa-dev
sudo apt install vulkan-tools
sudo apt install libvulkan-dev
sudo apt install vulkan-validationlayers-dev spirv-tools glslang-tools
sudo apt install vulkan-utility-libraries-dev spirv-tools glslang-tools
sudo apt install libxrandr-dev libxxf86vm-dev
sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev
sudo apt-get install libgl1-mesa-dev libvulkan-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev mesa-common-dev
Expand All @@ -36,4 +36,3 @@ jobs:
cd build
cmake ..
cmake --build .

2 changes: 1 addition & 1 deletion .github/workflows/build-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
98 changes: 0 additions & 98 deletions .reuse/dep5

This file was deleted.

10 changes: 5 additions & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build

## Prerequisites
* [CMake 3.22.1](https://cmake.org/download/)
* [Python 3.6+](https://www.python.org/downloads/)
* [CMake 3.28.3+](https://cmake.org/download/)
* [Python 3.6 <= 3.12](https://www.python.org/downloads/)

## Windows

Expand Down Expand Up @@ -40,12 +40,12 @@ Open the `openxr-tutorial` solution file and build the `ALL_BUILD` project. Sele

## Android

Download [Android Studio](https://developer.android.com/studio) 2022.1.1 or later.
Download [Android Studio](https://developer.android.com/studio) 2024.3.2 or later.

Android Prequisites:
* SDK: 29
* NDK: 23.1.7779620
* Android Studio/Gradle Plugin Version: 7.4.2
* NDK: 27.2.12479018
* CMake: 3.28.3+

See additional [prerequisites](#Prerequisites).

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

# XR_DOCS_TAG_BEGIN_CMakeLists
cmake_minimum_required(VERSION 3.22.1)
cmake_minimum_required(VERSION 3.28.3)

project(openxr-tutorial)

Expand Down
48 changes: 22 additions & 26 deletions Chapter1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

# XR_DOCS_TAG_BEGIN_SetProjectName1
cmake_minimum_required(VERSION 3.22.1)
cmake_minimum_required(VERSION 3.28.3)
set(PROJECT_NAME OpenXRTutorialChapter1)
project("${PROJECT_NAME}")
# XR_DOCS_TAG_END_SetProjectName1
Expand All @@ -19,21 +19,24 @@ include("../cmake/graphics_api_select.cmake")
include(FetchContent)

# openxr_loader - From github.com/KhronosGroup
set(BUILD_TESTS
OFF
CACHE INTERNAL "Build tests"
)
set(BUILD_API_LAYERS
ON
CACHE INTERNAL "Use OpenXR layers"
ON
CACHE INTERNAL "Use OpenXR layers"
)
set(BUILD_TESTS
OFF
CACHE INTERNAL "Build tests"
)
FetchContent_Declare(
OpenXR
URL_HASH MD5=924a94a2da0b5ef8e82154c623d88644
URL https://github.com/KhronosGroup/OpenXR-SDK-Source/archive/refs/tags/release-1.0.34.zip
SOURCE_DIR
openxr
EXCLUDE_FROM_ALL
DOWNLOAD_EXTRACT_TIMESTAMP
URL_HASH MD5=f52248ef83da9134bec2b2d8e0970677
URL https://github.com/KhronosGroup/OpenXR-SDK-Source/archive/refs/tags/release-1.1.49.tar.gz
SOURCE_DIR
openxr
)

FetchContent_MakeAvailable(OpenXR)
# XR_DOCS_TAG_END_FetchContent

Expand Down Expand Up @@ -64,14 +67,12 @@ set(HEADERS
if(ANDROID) # Android
# XR_DOCS_TAG_BEGIN_Android
add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADERS})
add_dependencies(${PROJECT_NAME} XrApiLayer_core_validation)
target_include_directories(
${PROJECT_NAME}
PRIVATE
# In this repo
../Common/
# From OpenXR repo
"${openxr_SOURCE_DIR}/src/common"
"${openxr_SOURCE_DIR}/external/include"
)

# export ANativeActivity_onCreate for java to call.
Expand Down Expand Up @@ -106,9 +107,9 @@ if(ANDROID) # Android
# XR_DOCS_TAG_END_VulkanNDK

# XR_DOCS_TAG_BEGIN_Gfxwrapper
include(../cmake/gfxwrapper.cmake)
if(TARGET openxr-gfxwrapper)
target_link_libraries(${PROJECT_NAME} openxr-gfxwrapper)
include(../thirdparty/glwrapper/CMakeLists.txt)
if(TARGET tutorial_glwrapper)
target_link_libraries(${PROJECT_NAME} tutorial_glwrapper)
target_compile_definitions(
${PROJECT_NAME} PUBLIC XR_TUTORIAL_USE_OPENGL_ES
)
Expand All @@ -131,11 +132,9 @@ else() # Windows / Linux
PRIVATE
# In this repo
../Common/
# From OpenXR repo
"${openxr_SOURCE_DIR}/src/common"
"${openxr_SOURCE_DIR}/external/include"
)
target_link_libraries(${PROJECT_NAME} openxr_loader)
add_dependencies(${PROJECT_NAME} XrApiLayer_core_validation)
# XR_DOCS_TAG_END_WindowsLinux
addgraphicsapidefine(${PROJECT_NAME})

Expand Down Expand Up @@ -178,12 +177,9 @@ else() # Windows / Linux

# XR_DOCS_TAG_BEGIN_OpenGL
# OpenGL
include(../cmake/gfxwrapper.cmake)
if(TARGET openxr-gfxwrapper)
target_include_directories(
${PROJECT_NAME} PUBLIC ${openxr_SOURCE_DIR}/src/common
)
target_link_libraries(${PROJECT_NAME} openxr-gfxwrapper)
include(../thirdparty/glwrapper/CMakeLists.txt)
if(TARGET tutorial_glwrapper)
target_link_libraries(${PROJECT_NAME} tutorial_glwrapper)
target_compile_definitions(
${PROJECT_NAME} PUBLIC XR_TUTORIAL_USE_OPENGL
)
Expand Down
6 changes: 3 additions & 3 deletions Chapter1/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
android {
namespace 'org.khronos.OpenXRTutorialChapter1'
compileSdk 29
ndkVersion '23.1.7779620'
ndkVersion '27.2.12479018'

defaultConfig {
applicationId "org.khronos.OpenXRTutorialChapter1"
Expand All @@ -24,7 +24,7 @@ android {

externalNativeBuild {
cmake {
version '3.22.1'
version '3.28.3+'
path '../CMakeLists.txt'
}
}
Expand All @@ -36,5 +36,5 @@ android {
}

dependencies {
implementation 'org.khronos.openxr:openxr_loader_for_android:1.0.34'
implementation 'org.khronos.openxr:openxr_loader_for_android:1.1.49'
}
2 changes: 1 addition & 1 deletion Chapter1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.2' apply false
id 'com.android.application' version '8.10.1' apply false
}


Expand Down
3 changes: 3 additions & 0 deletions Chapter1/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ android.enableJetifier=false
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Binary file modified Chapter1/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion Chapter1/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading