Skip to content

Commit ef9acf8

Browse files
committed
[VR] Initial support for VR via OpenXR
This commit adds initial support for playing Quake 3 Arena in VR using OpenXR API. This work was initially based on Quake3Quest project which was rebased on top of newest `ioquake3` idTech3 fork, adjusted for PCVR (including rewriting big chunks of OpenXR-related code) with a lot of bugs fixed and many features and QoL improvements added along the way. Currently building and playing is supported only on Windows (with MSVC or Mingw).
1 parent 7c2603a commit ef9acf8

File tree

187 files changed

+12600
-34158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+12600
-34158
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
1-
# These are supported funding model platforms
2-
3-
patreon: nuclearmonster
4-
open_collective: # Replace with a single Open Collective username
5-
ko_fi: mrnuclearmonster
6-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
7-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
8-
liberapay: # Replace with a single Liberapay username
9-
issuehunt: # Replace with a single IssueHunt username
10-
otechie: # Replace with a single Otechie username
11-
custom: ['https://www.patreon.com/icculus', 'https://www.patreon.com/SmileTheory']
12-
13-
14-
#please add your links to this if you've been a long-time contributor!
1+
github: RippeR37
2+
buy_me_a_coffee: RippeR37
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Report a bug
2+
description: Create a new bug report (please ensure its not a duplicate!)
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for helping us improve the project!
10+
Please fill out the following with as many details as possible.
11+
- type: dropdown
12+
id: os
13+
attributes:
14+
label: Operating System
15+
description: Select your operating system on which the problem occurs
16+
multiple: true
17+
options:
18+
- Windows 10
19+
- Windows 11
20+
- Linux
21+
- macOS
22+
validations:
23+
required: true
24+
- type: dropdown
25+
id: vr-runtime
26+
attributes:
27+
label: VR Runtime
28+
description: Select VR runtimes on which the problem occurs
29+
multiple: true
30+
options:
31+
- SteamVR
32+
- HTC
33+
- Windows Mixed Reality
34+
- Oculus/Meta
35+
- Varjo
36+
- Other (please specify below)
37+
validations:
38+
required: true
39+
- type: input
40+
id: other-runtime
41+
attributes:
42+
label: Other VR Runtime
43+
description: If you selected 'Other' above, please specify here
44+
validations:
45+
required: false
46+
- type: input
47+
id: gpu
48+
attributes:
49+
label: GPU
50+
description: Specify your graphics card model
51+
placeholder: e.g. Nvidia RTX 4080
52+
validations:
53+
required: true
54+
- type: input
55+
id: headset
56+
attributes:
57+
label: VR Headset
58+
description: Which headset are you using?
59+
placeholder: e.g, Valve Index, Meta Quest 3
60+
validations:
61+
required: true
62+
- type: input
63+
id: controllers
64+
attributes:
65+
label: VR Controllers
66+
description: Specify the controllers you use (optional)
67+
placeholder: e.g. Valve Index Controllers, Quest Touch Pro
68+
validations:
69+
required: false
70+
- type: textarea
71+
id: description
72+
attributes:
73+
label: Problem description
74+
description: Describe the issue you encountered
75+
placeholder: |
76+
What happened?
77+
78+
What were you expecting to happen instead?
79+
80+
Please attach any logs, screenshots or recordings if you can.
81+
validations:
82+
required: true
83+
- type: textarea
84+
id: steps
85+
attributes:
86+
label: Steps to reproduce
87+
description: List the steps that reproduce the issue
88+
placeholder: |
89+
1. Launch the game
90+
2. ...
91+
3. Something unexpected happens
92+
validations:
93+
required: true
94+
- type: input
95+
id: app-version
96+
attributes:
97+
label: Game version / build
98+
description: Which version of the app are you using?
99+
placeholder: e.g. beta, v1.0
100+
validations:
101+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Go to support forum
4+
url: https://github.com/RippeR37/q3vr/discussions
5+
about: Ask a question or propose a feature

.github/workflows/build.yml

Lines changed: 38 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,18 @@
11
name: Build
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- develop
7+
- release/*
8+
tags:
9+
- '*'
10+
pull_request:
11+
workflow_dispatch:
12+
schedule:
13+
- cron: '18 0 1 * *'
314

415
jobs:
5-
linux-legacy:
6-
name: Linux (Legacy Makefile)
7-
runs-on: ubuntu-22.04
8-
steps:
9-
- uses: actions/checkout@v4
10-
- name: Install Dependencies
11-
run: |
12-
sudo apt-get update
13-
sudo apt-get install libsdl2-dev
14-
- name: Compile
15-
run: |
16-
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
17-
make release -j$(nproc)
18-
windows-legacy:
19-
name: Windows (Legacy Makefile)
20-
runs-on: windows-2022
21-
steps:
22-
- uses: actions/checkout@v4
23-
- name: Compile
24-
run: |
25-
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
26-
make release -j $env:NUMBER_OF_PROCESSORS
27-
macos-legacy:
28-
name: macOS (Legacy Makefile)
29-
runs-on: macos-13
30-
steps:
31-
- uses: actions/checkout@v4
32-
- name: Compile
33-
run: |
34-
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
35-
make release -j$(sysctl -n hw.logicalcpu)
36-
emscripten-legacy:
37-
name: Emscripten (Legacy Makefile)
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v4
41-
- uses: actions/checkout@v4
42-
with:
43-
repository: emscripten-core/emsdk
44-
path: emsdk
45-
- name: Install Dependencies
46-
run: |
47-
cd emsdk
48-
./emsdk install 3.1.58
49-
./emsdk activate 3.1.58
50-
- name: Compile
51-
run: |
52-
echo I_ACKNOWLEDGE_THE_MAKEFILE_IS_DEPRECATED=1 > Makefile.local
53-
source emsdk/emsdk_env.sh
54-
emmake make release -j$(nproc)
55-
5616
linux:
5717
name: Linux
5818
runs-on: ubuntu-22.04
@@ -86,16 +46,29 @@ jobs:
8646
cmake --build build --config Release
8747
$version = Get-Content build/version.txt -Raw
8848
Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$version"
49+
dir .
50+
dir build
51+
dir build\Release
52+
dir build\Release\baseq3
53+
Get-ChildItem -Path . -Filter *.exe -Recurse -File
8954
cpack --config build/CPackConfig.cmake -B build/installer --verbose
9055
Move-Item -Path "build/installer/*.exe" -Destination "build/Release"
91-
- name: Upload
56+
- name: Upload portable
9257
uses: actions/upload-artifact@v4
9358
with:
94-
name: ${{ github.event.repository.name }}-windows-msvc-${{ env.VERSION }}
59+
name: ${{ github.event.repository.name }}-windows-msvc-${{ env.VERSION }}-portable
9560
path: |
9661
build/Release/**/*.dll
97-
build/Release/**/*.exe
62+
build/Release/**/q3vr.exe
9863
build/Release/**/*.qvm
64+
build/Release/**/*.pk3
65+
build/Release/**/COPYING.txt
66+
- name: Upload installer
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: ${{ github.event.repository.name }}-windows-msvc-${{ env.VERSION }}-installer
70+
path: |
71+
build/Release/**/q3vr-*-installer.exe
9972
windows-mingw:
10073
name: Windows MinGW
10174
runs-on: windows-2022
@@ -112,11 +85,19 @@ jobs:
11285
- name: Upload
11386
uses: actions/upload-artifact@v4
11487
with:
115-
name: ${{ github.event.repository.name }}-windows-mingw-${{ env.VERSION }}
88+
name: ${{ github.event.repository.name }}-windows-mingw-${{ env.VERSION }}-portable
11689
path: |
11790
build/Release/**/*.dll
118-
build/Release/**/*.exe
91+
build/Release/**/q3vr.exe
11992
build/Release/**/*.qvm
93+
build/Release/**/*.pk3
94+
build/Release/**/COPYING.txt
95+
- name: Upload installer
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: ${{ github.event.repository.name }}-windows-mingw-${{ env.VERSION }}-installer
99+
path: |
100+
build/Release/**/q3vr-*-installer.exe
120101
macos:
121102
name: macOS
122103
runs-on: macos-13
@@ -151,37 +132,3 @@ jobs:
151132
name: ${{ github.event.repository.name }}-macOS-${{ env.VERSION }}
152133
path: |
153134
build/Release/**/*
154-
emscripten:
155-
name: Emscripten
156-
runs-on: ubuntu-22.04
157-
steps:
158-
- uses: actions/checkout@v4
159-
- name: Install emsdk
160-
uses: mymindstorm/setup-emsdk@v13
161-
with:
162-
version: 3.1.58
163-
- name: Compile
164-
run: |
165-
emcmake cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
166-
cmake --build build
167-
echo "VERSION=$(cat build/version.txt)" >> $GITHUB_ENV
168-
- name: Upload
169-
uses: actions/upload-artifact@v4
170-
with:
171-
name: ${{ github.event.repository.name }}-emscripten-${{ env.VERSION }}
172-
path: |
173-
build/Release/**/*
174-
linux-external-libraries:
175-
name: Linux (USE_INTERNAL_LIBS OFF)
176-
runs-on: ubuntu-22.04
177-
steps:
178-
- uses: actions/checkout@v4
179-
- name: Install Dependencies
180-
run: |
181-
sudo apt-get update
182-
sudo apt-get install libsdl2-dev zlib1g-dev libjpeg-dev libopenal-dev \
183-
libogg-dev libvorbis-dev libopus-dev libopusfile-dev libcurl4-openssl-dev
184-
- name: Compile
185-
run: |
186-
cmake -S . -B build -G Ninja -DUSE_INTERNAL_LIBS=OFF -DCMAKE_BUILD_TYPE=Release
187-
cmake --build build

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@ profile
4343
*.opensdf
4444
*.suo
4545
/.vs
46+
47+
# Cache
48+
####################
49+
.cache/

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ endif()
88

99
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
1010
include(identity)
11+
include(vcpkg_init)
1112

1213
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES C)
1314

14-
option(BUILD_SERVER "Build dedicated server" ON)
15+
option(BUILD_SERVER "Build dedicated server" OFF)
1516
option(BUILD_CLIENT "Build client" ON)
16-
option(BUILD_RENDERER_GL1 "Build GL1 renderer" ON)
1717
option(BUILD_RENDERER_GL2 "Build GL2 renderer" ON)
1818
option(BUILD_GAME_LIBRARIES "Build game module libraries" ON)
19-
option(BUILD_GAME_QVMS "Build game module qvms" ON)
19+
option(BUILD_GAME_QVMS "Build game module qvms" OFF)
2020
option(BUILD_STANDALONE "Build binaries for standalone games" OFF)
2121

22-
option(USE_RENDERER_DLOPEN "Dynamically load the renderer(s)" ON)
22+
option(USE_RENDERER_DLOPEN "Dynamically load the renderer(s)" OFF)
2323
option(USE_OPENAL "OpenAL audio" ON)
2424
option(USE_OPENAL_DLOPEN "Dynamically load OpenAL" ON)
2525
option(USE_HTTP "HTTP download support" ON)
@@ -37,6 +37,8 @@ option(USE_INTERNAL_OGG "Use internal copy of ogg" ${USE_INTERNAL_LIBS})
3737
option(USE_INTERNAL_VORBIS "Use internal copy of vorbis" ${USE_INTERNAL_LIBS})
3838
option(USE_INTERNAL_OPUS "Use internal copy of opus" ${USE_INTERNAL_LIBS})
3939

40+
option(USE_DEBUG_STACKTRACE "Enable debug stacktraces" OFF)
41+
4042
# Release build by default, set externally if you want something else
4143
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
4244
set(CMAKE_BUILD_TYPE Release)
@@ -80,7 +82,6 @@ include(platforms/all)
8082
include(libraries/all)
8183

8284
include(server)
83-
include(renderer_gl1)
8485
include(renderer_gl2)
8586
include(client)
8687
include(basegame)

0 commit comments

Comments
 (0)