From c4586241578430ec80aac45321fc5a522c9bfa82 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 7 Feb 2024 02:59:13 -0500 Subject: [PATCH] fix(idl): update to main branch of core --- Cargo.lock | 4 ++-- Cargo.toml | 1 - codegen/Cargo.toml | 1 - src/nodes/drawable/mod.rs | 35 +++++++++++++++-------------------- 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 66a93e2..dda7a7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2081,7 +2081,7 @@ checksum = "2f2b15926089e5526bb2dd738a2eb0e59034356e06eb71e1cd912358c0e62c4d" [[package]] name = "stardust-xr" version = "0.14.1" -source = "git+https://github.com/StardustXR/core.git?branch=feat/idl#451181bfd454f30861bf310742bf7a16bdb36264" +source = "git+https://github.com/StardustXR/core.git#ddb2953f6acac01ee9c4ccfae2d4b7eb959a07a2" dependencies = [ "cluFlock", "color-rs", @@ -2101,7 +2101,7 @@ dependencies = [ [[package]] name = "stardust-xr-schemas" version = "1.5.3" -source = "git+https://github.com/StardustXR/core.git?branch=feat/idl#451181bfd454f30861bf310742bf7a16bdb36264" +source = "git+https://github.com/StardustXR/core.git#ddb2953f6acac01ee9c4ccfae2d4b7eb959a07a2" dependencies = [ "flatbuffers", "flexbuffers", diff --git a/Cargo.toml b/Cargo.toml index ab0904e..243e18f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,7 +103,6 @@ optional = true [dependencies.stardust-xr] git = "https://github.com/StardustXR/core.git" -branch = "feat/idl" [dependencies.stardust-xr-server-codegen] path = "codegen" diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 3fb3d9f..1a66a23 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -15,4 +15,3 @@ split-iter = "0.1.0" [dependencies.stardust-xr-schemas] git = "https://github.com/StardustXR/core.git" -branch = "feat/idl" diff --git a/src/nodes/drawable/mod.rs b/src/nodes/drawable/mod.rs index 3841f9a..1f9a4d7 100644 --- a/src/nodes/drawable/mod.rs +++ b/src/nodes/drawable/mod.rs @@ -44,27 +44,24 @@ create_interface!(DrawableInterface, DrawableInterfaceAspect, "/drawable"); pub struct DrawableInterface; impl DrawableInterfaceAspect for DrawableInterface { - #[doc = "Set the sky lignt/texture to a given HDRI file."] - fn set_sky( - _node: Arc, - calling_client: Arc, - tex: Option, - light: Option, - ) -> Result<()> { - if let Some(tex) = tex { - let resource_path = get_resource_file(&tex, &calling_client, &[OsStr::new("hdr")]) - .ok_or(eyre::eyre!("Could not find resource"))?; - QUEUED_SKYTEX.lock().replace(resource_path); - } - if let Some(light) = light { - let resource_path = get_resource_file(&light, &calling_client, &[OsStr::new("hdr")]) - .ok_or(eyre::eyre!("Could not find resource"))?; - QUEUED_SKYLIGHT.lock().replace(resource_path); - } + fn set_sky_tex(_node: Arc, calling_client: Arc, tex: ResourceID) -> Result<()> { + let resource_path = get_resource_file(&tex, &calling_client, &[OsStr::new("hdr")]) + .ok_or(eyre::eyre!("Could not find resource"))?; + QUEUED_SKYTEX.lock().replace(resource_path); + Ok(()) + } + + fn set_sky_light( + _node: Arc, + calling_client: Arc, + light: ResourceID, + ) -> Result<()> { + let resource_path = get_resource_file(&light, &calling_client, &[OsStr::new("hdr")]) + .ok_or(eyre::eyre!("Could not find resource"))?; + QUEUED_SKYLIGHT.lock().replace(resource_path); Ok(()) } - #[doc = "Create a lines node"] fn create_lines( _node: Arc, calling_client: Arc, @@ -84,7 +81,6 @@ impl DrawableInterfaceAspect for DrawableInterface { Ok(()) } - #[doc = "Load a GLTF model into a Model node"] fn load_model( _node: Arc, calling_client: Arc, @@ -103,7 +99,6 @@ impl DrawableInterfaceAspect for DrawableInterface { Ok(()) } - #[doc = "Create a text node"] fn create_text( _node: Arc, calling_client: Arc,