mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-21 22:38:41 -06:00
parent
55f2fc07b3
commit
cc1490db8a
77
Cargo.lock
generated
77
Cargo.lock
generated
|
@ -168,12 +168,6 @@ version = "1.4.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
|
||||
|
||||
[[package]]
|
||||
name = "calloop"
|
||||
version = "0.10.5"
|
||||
|
@ -193,12 +187,6 @@ version = "1.0.79"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
|
||||
|
||||
[[package]]
|
||||
name = "cesu8"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
|
@ -266,16 +254,6 @@ version = "1.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
||||
|
||||
[[package]]
|
||||
name = "combine"
|
||||
version = "4.6.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.3"
|
||||
|
@ -738,12 +716,6 @@ dependencies = [
|
|||
"takeable-option",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "glutin"
|
||||
version = "0.29.1"
|
||||
|
@ -959,34 +931,6 @@ version = "1.0.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
|
||||
|
||||
[[package]]
|
||||
name = "java-locator"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72cb7c9d00a642469deceff95ca37d0da9ce72d7f8b863edbebdf0aac75093da"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jni"
|
||||
version = "0.21.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
|
||||
dependencies = [
|
||||
"cesu8",
|
||||
"cfg-if",
|
||||
"combine",
|
||||
"java-locator",
|
||||
"jni-sys",
|
||||
"libloading",
|
||||
"log",
|
||||
"thiserror",
|
||||
"walkdir",
|
||||
"windows-sys 0.45.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jni-sys"
|
||||
version = "0.3.0"
|
||||
|
@ -1019,13 +963,11 @@ dependencies = [
|
|||
"glium",
|
||||
"hashbrown 0.13.2",
|
||||
"image",
|
||||
"jni",
|
||||
"kubi-logging",
|
||||
"kubi-shared",
|
||||
"log",
|
||||
"lz4_flex",
|
||||
"ndk",
|
||||
"ndk-context",
|
||||
"ndk-glue",
|
||||
"nohash-hasher",
|
||||
"postcard",
|
||||
|
@ -1754,15 +1696,6 @@ dependencies = [
|
|||
"bytemuck",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scoped-tls"
|
||||
version = "1.0.1"
|
||||
|
@ -2133,16 +2066,6 @@ version = "0.9.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.11.0+wasi-snapshot-preview1"
|
||||
|
|
|
@ -32,11 +32,9 @@ tinyset = "0.4"
|
|||
[target.'cfg(target_os = "android")'.dependencies]
|
||||
ndk = "0.7"
|
||||
ndk-glue = "0.7"
|
||||
ndk-context = "0.1"
|
||||
jni = { version = "0.21", features = ["invocation"] }
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
winapi = "0.3"
|
||||
winapi = { version = "0.3" }
|
||||
|
||||
[features]
|
||||
default = ["raw-evt"]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#![allow(clippy::too_many_arguments)] // allowed because systems often need a lot of arguments
|
||||
|
||||
use anyhow::Result;
|
||||
use shipyard::{
|
||||
World, Workload, IntoWorkload,
|
||||
UniqueView, UniqueViewMut,
|
||||
|
@ -171,36 +170,12 @@ fn attach_console() {
|
|||
unsafe { AttachConsole(ATTACH_PARENT_PROCESS); }
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
fn do_android_init() -> Result<()> {
|
||||
// let ctx = ndk_context::android_context();
|
||||
// let vm = unsafe { jni::JavaVM::from_raw(ctx.vm().cast()) }?;
|
||||
// let env = vm.attach_current_thread()?;
|
||||
// let window = env.call_method(
|
||||
// ctx.context() as jni::sys::jobject,
|
||||
// "getWindow",
|
||||
// "(Ljava/lang/Object;)Ljava/lang/Object;",
|
||||
// &[],
|
||||
// )?;
|
||||
// env.call_method(
|
||||
// window as jni::sys::jobject,
|
||||
// "setColorMode",
|
||||
// "(Ljava/lang/Object;)Ljava/lang/Object;",
|
||||
// &[],
|
||||
// )?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
#[cfg_attr(target_os = "android", ndk_glue::main(backtrace = "on"))]
|
||||
pub fn kubi_main() {
|
||||
//Attach console on release builds on windows
|
||||
#[cfg(all(windows, not(debug_assertions)))] attach_console();
|
||||
|
||||
//Android-specific jni/ndk stuff
|
||||
#[cfg(target_os = "android")] do_android_init();
|
||||
|
||||
//Print version
|
||||
println!("{:─^54}", format!("[ ▄▀ Kubi client v. {} ]", env!("CARGO_PKG_VERSION")));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ macro_rules! include_shader_prefab {
|
|||
tessellation_control_shader: None,
|
||||
tessellation_evaluation_shader: None,
|
||||
transform_feedback_varyings: None,
|
||||
outputs_srgb: true,
|
||||
outputs_srgb: false,
|
||||
uses_point_size: false,
|
||||
}).expect("Failed to compile gpu program")
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ pub fn load_texture2darray_prefab<
|
|||
};
|
||||
//Create a glium RawImage
|
||||
RawImage2d::from_raw_rgba_reversed(
|
||||
&image_data,
|
||||
&image_data,
|
||||
dimensions
|
||||
)
|
||||
}).collect();
|
||||
|
|
|
@ -83,7 +83,7 @@ impl Renderer {
|
|||
});
|
||||
|
||||
let cb = ContextBuilder::new()
|
||||
.with_srgb(true)
|
||||
.with_srgb(false)
|
||||
.with_depth_buffer(24)
|
||||
.with_multisampling(settings.msaa.unwrap_or_default())
|
||||
.with_vsync(settings.vsync)
|
||||
|
|
Loading…
Reference in a new issue