OpenXR VR bindings for Raylib.
rlOpenXR_hello_teleport_Kq90m709DV.mp4
To stay close to the design of Raylib. A concise yet powerful subset of OpenXR is exposed. Most of the API is there to wrap the interaction with Raylib (Mostly rendering). And covering very common usage, eg Head/Hands position.
Raylib 4.2
- Rlgl rendering backend
- Builtin Head pose state
- Hand interface abstraction
- Controller state rendering
- More convenient Input API
- Virtual hand system and rendering
- Windows
- Linux
- Android (Targeting standalone HMDs like Quest 2)
- WebXR
- Varjo 4 screen HMDs
RlOpenXR uses CMake (minimum 3.15) as it's build system.
Option | Description | Default |
---|---|---|
RLOPENXR_BUILD_EXAMPLES |
Build RLOpenXR Examples | On |
Out of the box rlOpenXR only supports CMake. There are a few options on how to add a library as a dependency in CMake:
Download the source for rlOpenXR into a subfolder in your project, for example: "third_party/rlOpenXR".
This can be done via git: git clone https://github.com/FireFlyForLife/rlOpenXR.git
.
Or by manually going to the github repo and going to "Code" -> "Download Zip".
Then in your CMakeLists.txt file for your project, add the following lines:
add_subdirectory(third_party/rlOpenXR)
# ...
target_link_libraries(YourProject PUBLIC rlOpenXR) # Add rlOpenXR as a dependency to your project
In your CMakeLists.txt file, add the following lines:
FetchContent_Declare(
rlOpenXR
GIT_REPOSITORY https://github.com/FireFlyForLife/rlOpenXR.git
GIT_TAG "v1.1.0"
)
FetchContent_MakeAvailable(rlOpenXR)
# ...
target_link_libraries(YourProject PUBLIC rlOpenXR) # Add rlOpenXR as a dependency to your project
In the FetchContent_MakeAvailable()
call, CMake will download the repository via Git, and add it parse it's CMake file.