android example lib, almost done
This commit is contained in:
@@ -4,9 +4,3 @@ 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`.
|
||||||
|
|
||||||
## Quest
|
|
||||||
Running on Meta Quest can be done with https://github.com/rust-mobile/cargo-apk and requires disabling default features.
|
|
||||||
```sh
|
|
||||||
cargo apk run --example xr --release --no-default-features
|
|
||||||
```
|
|
||||||
|
|||||||
3
examples/android/.gitignore
vendored
Normal file
3
examples/android/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
/target
|
||||||
|
/Cargo.lock
|
||||||
|
/runtime_libs
|
||||||
@@ -13,10 +13,10 @@ crate-type = ["staticlib", "cdylib"]
|
|||||||
[package.metadata.android]
|
[package.metadata.android]
|
||||||
package = "org.bevyengine.example_openxr_android"
|
package = "org.bevyengine.example_openxr_android"
|
||||||
build_targets = ["aarch64-linux-android"]
|
build_targets = ["aarch64-linux-android"]
|
||||||
runtime_libs = "examples/libs"
|
runtime_libs = "runtime_libs"
|
||||||
apk_name = "bevyopenxr"
|
apk_name = "bevyopenxr"
|
||||||
assets = "assets"
|
# assets = "assets"
|
||||||
res = "assets/android-res"
|
# res = "assets/android-res"
|
||||||
icon = "@mipmap/ic_launcher"
|
icon = "@mipmap/ic_launcher"
|
||||||
label = "Bevy Openxr Android"
|
label = "Bevy Openxr Android"
|
||||||
strip = "strip"
|
strip = "strip"
|
||||||
@@ -29,18 +29,9 @@ target_sdk_version = 32
|
|||||||
# label = "Bevy Example"
|
# label = "Bevy Example"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
bevy_openxr = { path = "../.." }
|
||||||
# ash = "0.37.3"
|
|
||||||
bevy = { git = "https://github.com/bevyengine/bevy.git" }
|
bevy = { git = "https://github.com/bevyengine/bevy.git" }
|
||||||
openxr = { git = "https://github.com/Ralith/openxrs", features = ["mint"] }
|
openxr = { git = "https://github.com/Ralith/openxrs", features = ["mint"] }
|
||||||
mint = "0.5.9"
|
|
||||||
|
|
||||||
wgpu = "0.17.1"
|
|
||||||
wgpu-core = { version = "0.17.1", features = ["vulkan"] }
|
|
||||||
wgpu-hal = "0.17.2"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
color-eyre = "0.6.2"
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "fat"
|
lto = "fat"
|
||||||
@@ -61,6 +52,16 @@ categories = [
|
|||||||
"android.intent.category.LAUNCHER",
|
"android.intent.category.LAUNCHER",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# !! IMPORTANT !!
|
||||||
|
#
|
||||||
|
# When creating your own apps, make sure to generate your own keystore, rather than using our example one!
|
||||||
|
# You can use `keytool` like so:
|
||||||
|
# keytool -genkey -v -keystore my-release-key.keystore -keyalg RSA -keysize 2048 -validity 10000
|
||||||
|
#
|
||||||
|
# For more information on key signing and why it's so important, check out this article:
|
||||||
|
# https://developer.android.com/studio/publish/app-signing
|
||||||
|
#
|
||||||
|
# !! IMPORTANT !!
|
||||||
[package.metadata.android.signing.release]
|
[package.metadata.android.signing.release]
|
||||||
path = "./hotham_examples.keystore"
|
path = "./hotham_examples.keystore"
|
||||||
keystore_password = "chomsky-vigilant-spa"
|
keystore_password = "chomsky-vigilant-spa"
|
||||||
|
|||||||
6
examples/android/README.md
Normal file
6
examples/android/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Bevy OpenXR Android example
|
||||||
|
|
||||||
|
Running on Meta Quest can be done with https://github.com/rust-mobile/cargo-apk and requires disabling default features.
|
||||||
|
```sh
|
||||||
|
cargo apk run --release
|
||||||
|
```
|
||||||
BIN
examples/android/hotham_examples.keystore
Normal file
BIN
examples/android/hotham_examples.keystore
Normal file
Binary file not shown.
@@ -10,8 +10,6 @@ use bevy_openxr::DefaultXrPlugins;
|
|||||||
|
|
||||||
#[bevy_main]
|
#[bevy_main]
|
||||||
fn main() {
|
fn main() {
|
||||||
color_eyre::install().unwrap();
|
|
||||||
|
|
||||||
App::new()
|
App::new()
|
||||||
.add_plugins(DefaultXrPlugins)
|
.add_plugins(DefaultXrPlugins)
|
||||||
.add_plugins(OpenXrDebugRenderer)
|
.add_plugins(OpenXrDebugRenderer)
|
||||||
|
|||||||
Reference in New Issue
Block a user