Merge branch 'main' into demo
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: "Cache"
|
- name: "Cache"
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
- name: "External dependencies"
|
- name: "External dependencies"
|
||||||
run: sudo apt-get install -y libasound2-dev portaudio19-dev build-essential libpulse-dev libdbus-1-dev libudev-dev
|
run: sudo apt-get install -y libasound2-dev portaudio19-dev build-essential libpulse-dev libdbus-1-dev libudev-dev libopenxr-loader1 libopenxr-dev
|
||||||
- name: "Checks"
|
- name: "Checks"
|
||||||
run: |
|
run: |
|
||||||
cargo update
|
cargo update
|
||||||
|
|||||||
18
Cargo.toml
18
Cargo.toml
@@ -1,22 +1,32 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bevy_openxr"
|
name = "bevy_oxr"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
description = "Community crate for OpenXR in Bevy"
|
||||||
|
license = "MIT/Apache-2.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["linked"]
|
default = ["openxr/mint", "linked"]
|
||||||
linked = ["openxr/linked", "openxr/static"]
|
linked = ["openxr/linked"]
|
||||||
|
|
||||||
|
[workspace]
|
||||||
|
members = [ "examples/android" ]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
ash = "0.37.3"
|
ash = "0.37.3"
|
||||||
bevy = "0.12"
|
bevy = "0.12"
|
||||||
openxr = { version = "0.17.1", features = ["mint"] }
|
|
||||||
mint = "0.5.9"
|
mint = "0.5.9"
|
||||||
wgpu = "0.17.1"
|
wgpu = "0.17.1"
|
||||||
wgpu-core = { version = "0.17.1", features = ["vulkan"] }
|
wgpu-core = { version = "0.17.1", features = ["vulkan"] }
|
||||||
wgpu-hal = "0.17.1"
|
wgpu-hal = "0.17.1"
|
||||||
|
|
||||||
|
[target.'cfg( target_family = "unix" )'.dependencies]
|
||||||
|
openxr = "0.17.1"
|
||||||
|
|
||||||
|
[target.'cfg(not(target_family = "unix"))'.dependencies]
|
||||||
|
openxr = { version = "0.17.1", features = ["static"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bevy = "0.12"
|
bevy = "0.12"
|
||||||
color-eyre = "0.6.2"
|
color-eyre = "0.6.2"
|
||||||
|
|||||||
@@ -4,3 +4,9 @@ An in-progress crate for adding openxr support to Bevy without forking.
|
|||||||

|

|
||||||
|
|
||||||
To see it in action run the example in `examples` with `cargo run --example xr`
|
To see it in action run the example in `examples` with `cargo run --example xr`
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- Make sure, if you're on Linux, that you have the `openxr` package installed on your system.
|
||||||
|
- I'm getting poor performance.
|
||||||
|
- Like other bevy projects, make sure you're building in release (example: `cargo run --example xr --release`)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ target_sdk_version = 32
|
|||||||
# label = "Bevy Example"
|
# label = "Bevy Example"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy_openxr = { path = "../..", default-features = false }
|
bevy_oxr = { path = "../..", default-features = false }
|
||||||
bevy = "0.12"
|
bevy = "0.12"
|
||||||
openxr = { git = "https://github.com/Ralith/openxrs", features = ["mint"] }
|
openxr = { git = "https://github.com/Ralith/openxrs", features = ["mint"] }
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin};
|
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin};
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use bevy::transform::components::Transform;
|
use bevy::transform::components::Transform;
|
||||||
use bevy_openxr::xr_input::debug_gizmos::OpenXrDebugRenderer;
|
use bevy_oxr::xr_input::debug_gizmos::OpenXrDebugRenderer;
|
||||||
use bevy_openxr::xr_input::prototype_locomotion::{proto_locomotion, PrototypeLocomotionConfig};
|
use bevy_oxr::xr_input::prototype_locomotion::{proto_locomotion, PrototypeLocomotionConfig};
|
||||||
use bevy_openxr::xr_input::trackers::{
|
use bevy_oxr::xr_input::trackers::{
|
||||||
OpenXRController, OpenXRLeftController, OpenXRRightController, OpenXRTracker,
|
OpenXRController, OpenXRLeftController, OpenXRRightController, OpenXRTracker,
|
||||||
};
|
};
|
||||||
use bevy_openxr::DefaultXrPlugins;
|
use bevy_oxr::DefaultXrPlugins;
|
||||||
|
|
||||||
#[bevy_main]
|
#[bevy_main]
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|||||||
@@ -4,22 +4,22 @@ use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin};
|
|||||||
|
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use bevy::transform::components::Transform;
|
use bevy::transform::components::Transform;
|
||||||
use bevy_openxr::input::XrInput;
|
use bevy_oxr::input::XrInput;
|
||||||
use bevy_openxr::resources::{XrFrameState, XrInstance, XrSession};
|
use bevy_oxr::resources::{XrFrameState, XrInstance, XrSession};
|
||||||
|
|
||||||
use bevy_openxr::xr_input::hand::{OpenXrHandInput, HandInputDebugRenderer};
|
use bevy_oxr::xr_input::hand::{OpenXrHandInput, HandInputDebugRenderer};
|
||||||
use bevy_openxr::xr_input::interactions::{
|
use bevy_oxr::xr_input::interactions::{
|
||||||
draw_interaction_gizmos, draw_socket_gizmos, interactions, socket_interactions,
|
draw_interaction_gizmos, draw_socket_gizmos, interactions, socket_interactions,
|
||||||
update_interactable_states, InteractionEvent, Touched, XRDirectInteractor, XRInteractable,
|
update_interactable_states, InteractionEvent, Touched, XRDirectInteractor, XRInteractable,
|
||||||
XRInteractableState, XRInteractorState, XRRayInteractor, XRSocketInteractor,
|
XRInteractableState, XRInteractorState, XRRayInteractor, XRSocketInteractor,
|
||||||
};
|
};
|
||||||
use bevy_openxr::xr_input::oculus_touch::OculusController;
|
use bevy_oxr::xr_input::oculus_touch::OculusController;
|
||||||
use bevy_openxr::xr_input::prototype_locomotion::{proto_locomotion, PrototypeLocomotionConfig};
|
use bevy_oxr::xr_input::prototype_locomotion::{proto_locomotion, PrototypeLocomotionConfig};
|
||||||
use bevy_openxr::xr_input::trackers::{
|
use bevy_oxr::xr_input::trackers::{
|
||||||
AimPose, OpenXRController, OpenXRLeftController, OpenXRRightController, OpenXRTracker,
|
AimPose, OpenXRController, OpenXRLeftController, OpenXRRightController, OpenXRTracker,
|
||||||
};
|
};
|
||||||
use bevy_openxr::xr_input::Hand;
|
use bevy_oxr::xr_input::Hand;
|
||||||
use bevy_openxr::DefaultXrPlugins;
|
use bevy_oxr::DefaultXrPlugins;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
color_eyre::install().unwrap();
|
color_eyre::install().unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user