Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose sync pipeline comp, pipelined rendering experimental #74

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/android/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn main() {
app_info: XrAppInfo {
name: "Bevy OXR Android Example".into(),
},
enable_pipelined_rendering: false,
enable_pipelined_rendering: true,
..Default::default()
})
// .add_plugins(OpenXrDebugRenderer)
Expand Down
15 changes: 12 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ pub struct OpenXrPlugin {
pub reqeusted_extensions: XrExtensions,
pub prefered_blend_mode: XrPreferdBlendMode,
pub app_info: XrAppInfo,
/// Experimental might break stuff
pub enable_pipelined_rendering: bool,
pub synchronous_pipeline_compilation: bool,
}

impl Plugin for OpenXrPlugin {
Expand Down Expand Up @@ -100,14 +102,17 @@ impl Plugin for OpenXrPlugin {
render_instance,
),
// Expose this? if yes we also have to set this in the non xr case
synchronous_pipeline_compilation: true,
synchronous_pipeline_compilation: self.synchronous_pipeline_compilation,
});
app.insert_resource(XrStatus::Disabled);
// app.world.send_event(StartXrSession);
}
Err(err) => {
warn!("OpenXR Instance Failed to initialize: {}", err);
app.add_plugins(RenderPlugin::default());
app.add_plugins(RenderPlugin {
synchronous_pipeline_compilation: self.synchronous_pipeline_compilation,
..Default::default()
});
app.insert_resource(XrStatus::NoInstance);
}
}
Expand Down Expand Up @@ -256,7 +261,9 @@ pub struct DefaultXrPlugins {
pub reqeusted_extensions: XrExtensions,
pub prefered_blend_mode: XrPreferdBlendMode,
pub app_info: XrAppInfo,
/// Experimental might break stuff
pub enable_pipelined_rendering: bool,
pub synchronous_pipeline_compilation: bool,
}
impl Default for DefaultXrPlugins {
fn default() -> Self {
Expand All @@ -270,7 +277,8 @@ impl Default for DefaultXrPlugins {
reqeusted_extensions: default(),
prefered_blend_mode: default(),
app_info: default(),
enable_pipelined_rendering: true,
enable_pipelined_rendering: false,
synchronous_pipeline_compilation: false,
}
}
}
Expand All @@ -297,6 +305,7 @@ impl PluginGroup for DefaultXrPlugins {
reqeusted_extensions: self.reqeusted_extensions,
app_info: self.app_info.clone(),
enable_pipelined_rendering: self.enable_pipelined_rendering,
synchronous_pipeline_compilation: self.synchronous_pipeline_compilation,
})
.add_after::<OpenXrPlugin, _>(XrInitPlugin)
.add(XrInputPlugin)
Expand Down
Loading