diff --git a/crates/bevy_render/src/lib.rs b/crates/bevy_render/src/lib.rs index 8fb4ff8c0a527..06a2f6ab52be8 100644 --- a/crates/bevy_render/src/lib.rs +++ b/crates/bevy_render/src/lib.rs @@ -290,7 +290,7 @@ pub mod graph { } #[derive(Resource)] -struct FutureRenderResources(Arc>>); +pub struct FutureRenderResources(Arc>>); /// A label for the rendering sub-app. #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, AppLabel)] @@ -450,11 +450,11 @@ impl Plugin for RenderPlugin { /// A "scratch" world used to avoid allocating new worlds every frame when /// swapping out the [`MainWorld`] for [`ExtractSchedule`]. #[derive(Resource, Default)] -struct ScratchMainWorld(World); +pub struct ScratchMainWorld(World); /// Executes the [`ExtractSchedule`] step of the renderer. /// This updates the render world with the extracted ECS data of the current frame. -fn extract(main_world: &mut World, render_world: &mut World) { +pub fn extract(main_world: &mut World, render_world: &mut World) { // temporarily add the app world to the render world as a resource let scratch_world = main_world.remove_resource::().unwrap(); let inserted_world = core::mem::replace(main_world, scratch_world.0); diff --git a/crates/bevy_render/src/render_resource/bind_group_layout.rs b/crates/bevy_render/src/render_resource/bind_group_layout.rs index fb52cedc2490a..9ec7412ab1d40 100644 --- a/crates/bevy_render/src/render_resource/bind_group_layout.rs +++ b/crates/bevy_render/src/render_resource/bind_group_layout.rs @@ -66,7 +66,7 @@ impl Deref for BindGroupLayout { static EMPTY_BIND_GROUP_LAYOUT: OnceLock = OnceLock::new(); -pub(crate) fn init_empty_bind_group_layout(render_device: Res) { +pub fn init_empty_bind_group_layout(render_device: Res) { let layout = render_device.create_bind_group_layout(Some("empty_bind_group_layout"), &[]); EMPTY_BIND_GROUP_LAYOUT .set(layout) diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs index 5a30ab5250508..5a966b94cc97f 100644 --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -720,11 +720,11 @@ impl PipelineCache { self.waiting_pipelines.insert(id); } - pub(crate) fn process_pipeline_queue_system(mut cache: ResMut) { + pub fn process_pipeline_queue_system(mut cache: ResMut) { cache.process_queue(); } - pub(crate) fn extract_shaders( + pub fn extract_shaders( mut cache: ResMut, shaders: Extract>>, mut events: Extract>>, diff --git a/crates/bevy_render/src/sync_world.rs b/crates/bevy_render/src/sync_world.rs index d9a8a430b28fe..5b6d41ad7e555 100644 --- a/crates/bevy_render/src/sync_world.rs +++ b/crates/bevy_render/src/sync_world.rs @@ -211,7 +211,7 @@ pub(crate) struct PendingSyncEntity { records: Vec, } -pub(crate) fn entity_sync_system(main_world: &mut World, render_world: &mut World) { +pub fn entity_sync_system(main_world: &mut World, render_world: &mut World) { main_world.resource_scope(|world, mut pending: Mut| { // TODO : batching record for record in pending.drain(..) { @@ -253,7 +253,7 @@ pub(crate) fn entity_sync_system(main_world: &mut World, render_world: &mut Worl }); } -pub(crate) fn despawn_temporary_render_entities( +pub fn despawn_temporary_render_entities( world: &mut World, state: &mut SystemState>>, mut local: Local>,