Skip to content

Commit 5150e68

Browse files
committed
rebased
1 parent e35b0fe commit 5150e68

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

crates/bevy_core_pipeline/src/core_2d/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub struct Transparent2d {
109109
pub sort_key: FloatOrd,
110110
pub entity: Entity,
111111
pub pipeline: CachedRenderPipelineId,
112-
pub render_command: RenderCommandId,
112+
pub render_command_id: RenderCommandId,
113113
/// Range in the vertex buffer of this item
114114
pub batch_range: Option<Range<u32>>,
115115
}
@@ -129,7 +129,7 @@ impl PhaseItem for Transparent2d {
129129

130130
#[inline]
131131
fn render_command_id(&self) -> RenderCommandId {
132-
self.render_command
132+
self.render_command_id
133133
}
134134

135135
#[inline]

crates/bevy_pbr/src/material.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ where
190190

191191
if let Ok(render_app) = app.get_sub_app_mut(RenderApp) {
192192
render_app
193-
.init_resource::<DrawFunctions<Shadow>>()
193+
.init_resource::<RenderCommands<Shadow>>()
194194
.add_render_command::<Shadow, DrawPrepass<M>>()
195195
.add_render_command::<Transparent3d, DrawMaterial<M>>()
196196
.add_render_command::<Opaque3d, DrawMaterial<M>>()

crates/bevy_pbr/src/render/light.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ use bevy_asset::Handle;
1010
use bevy_core_pipeline::core_3d::Transparent3d;
1111
use bevy_ecs::prelude::*;
1212
use bevy_math::{Mat4, UVec3, UVec4, Vec2, Vec3, Vec3Swizzles, Vec4, Vec4Swizzles};
13+
use bevy_render::render_phase::{RenderCommandId, RenderCommands};
1314
use bevy_render::{
1415
camera::Camera,
1516
color::Color,
1617
mesh::Mesh,
1718
render_asset::RenderAssets,
1819
render_graph::{Node, NodeRunError, RenderGraphContext, SlotInfo, SlotType},
19-
render_phase::{
20-
CachedRenderPipelinePhaseItem, DrawFunctionId, DrawFunctions, PhaseItem, RenderPhase,
21-
},
20+
render_phase::{CachedRenderPipelinePhaseItem, PhaseItem, RenderPhase},
2221
render_resource::*,
2322
renderer::{RenderContext, RenderDevice, RenderQueue},
2423
texture::*,
@@ -1632,7 +1631,7 @@ pub fn queue_shadows<M: Material>(
16321631
};
16331632

16341633
shadow_phase.add(Shadow {
1635-
render_command: draw_shadow_mesh,
1634+
render_command_id: draw_shadow_mesh,
16361635
pipeline: pipeline_id,
16371636
entity,
16381637
distance: 0.0, // TODO: sort back-to-front
@@ -1648,7 +1647,7 @@ pub struct Shadow {
16481647
pub distance: f32,
16491648
pub entity: Entity,
16501649
pub pipeline: CachedRenderPipelineId,
1651-
pub render_command: RenderCommandId,
1650+
pub render_command_id: RenderCommandId,
16521651
}
16531652

16541653
impl PhaseItem for Shadow {
@@ -1666,7 +1665,7 @@ impl PhaseItem for Shadow {
16661665

16671666
#[inline]
16681667
fn render_command_id(&self) -> RenderCommandId {
1669-
self.render_command
1668+
self.render_command_id
16701669
}
16711670

16721671
#[inline]

crates/bevy_sprite/src/mesh2d/material.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ pub fn queue_material2d_meshes<M: Material2d>(
399399
let mesh_z = mesh2d_uniform.transform.w_axis.z;
400400
transparent_phase.add(Transparent2d {
401401
entity: *visible_entity,
402-
render_command: draw_transparent_pbr,
402+
render_command_id: draw_transparent_pbr,
403403
pipeline: pipeline_id,
404404
// NOTE: Back-to-front ordering for transparent with ascending sort means far should have the
405405
// lowest sort key and getting closer should increase. As we have

crates/bevy_sprite/src/render/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ pub fn queue_sprites(
706706
let item_end = colored_index;
707707

708708
transparent_phase.add(Transparent2d {
709-
render_command: draw_sprite_function,
709+
render_command_id: draw_sprite_function,
710710
pipeline: colored_pipeline,
711711
entity: current_batch_entity,
712712
sort_key,
@@ -724,7 +724,7 @@ pub fn queue_sprites(
724724
let item_end = index;
725725

726726
transparent_phase.add(Transparent2d {
727-
render_command: draw_sprite_function,
727+
render_command_id: draw_sprite_function,
728728
pipeline,
729729
entity: current_batch_entity,
730730
sort_key,

crates/bevy_ui/src/render/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ pub fn queue_uinodes(
618618
})
619619
});
620620
transparent_phase.add(TransparentUi {
621-
render_command: draw_ui_function,
621+
render_command_id: draw_ui_function,
622622
pipeline,
623623
entity,
624624
sort_key: FloatOrd(batch.z),

crates/bevy_ui/src/render/render_pass.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub struct TransparentUi {
9595
pub sort_key: FloatOrd,
9696
pub entity: Entity,
9797
pub pipeline: CachedRenderPipelineId,
98-
pub render_command: RenderCommandId,
98+
pub render_command_id: RenderCommandId,
9999
}
100100

101101
impl PhaseItem for TransparentUi {
@@ -113,7 +113,7 @@ impl PhaseItem for TransparentUi {
113113

114114
#[inline]
115115
fn render_command_id(&self) -> RenderCommandId {
116-
self.render_command
116+
self.render_command_id
117117
}
118118
}
119119

examples/2d/mesh2d_manual.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ pub fn queue_colored_mesh2d(
349349
let mesh_z = mesh2d_uniform.transform.w_axis.z;
350350
transparent_phase.add(Transparent2d {
351351
entity: *visible_entity,
352-
render_command: draw_colored_mesh2d,
352+
render_command_id: draw_colored_mesh2d,
353353
pipeline: pipeline_id,
354354
// The 2d render items are sorted according to their z value before rendering,
355355
// in order to get correct transparency

0 commit comments

Comments
 (0)