Skip to content

Commit

Permalink
Resolve conflicts with latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
msvbg committed Mar 29, 2024
1 parent c1aaccb commit 7451663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions crates/bevy_sprite/src/mesh2d/wireframe2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use bevy_color::{LinearRgba, Srgba};
use bevy_ecs::prelude::*;
use bevy_reflect::{std_traits::ReflectDefault, Reflect, TypePath};
use bevy_render::{
extract_resource::ExtractResource, mesh::MeshVertexBufferLayout, prelude::*, render_resource::*,
extract_resource::ExtractResource, mesh::MeshVertexBufferLayoutRef, prelude::*,
render_resource::*,
};

pub const WIREFRAME_2D_SHADER_HANDLE: Handle<Shader> = Handle::weak_from_u128(6920362697190520314);
Expand Down Expand Up @@ -221,7 +222,7 @@ impl Material2d for Wireframe2dMaterial {

fn specialize(
descriptor: &mut RenderPipelineDescriptor,
_layout: &MeshVertexBufferLayout,
_layout: &MeshVertexBufferLayoutRef,
_key: Material2dKey<Self>,
) -> Result<(), SpecializedMeshPipelineError> {
descriptor.primitive.polygon_mode = PolygonMode::Line;
Expand Down
6 changes: 3 additions & 3 deletions examples/2d/wireframe_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn setup(
Vec2::new(50.0, -50.0),
))
.into(),
material: materials.add(LegacyColor::BLACK),
material: materials.add(Color::BLACK),
transform: Transform::from_xyz(-150.0, 0.0, 0.0),
..default()
},
Expand All @@ -76,15 +76,15 @@ fn setup(
// Rectangle: Follows global wireframe setting
commands.spawn(MaterialMesh2dBundle {
mesh: meshes.add(Rectangle::new(100.0, 100.0)).into(),
material: materials.add(LegacyColor::BLACK),
material: materials.add(Color::BLACK),
transform: Transform::from_xyz(0.0, 0.0, 0.0),
..default()
});
// Circle: Always renders a wireframe
commands.spawn((
MaterialMesh2dBundle {
mesh: meshes.add(Circle::new(50.0)).into(),
material: materials.add(LegacyColor::BLACK),
material: materials.add(Color::BLACK),
transform: Transform::from_xyz(150.0, 0.0, 0.0),
..default()
},
Expand Down

0 comments on commit 7451663

Please sign in to comment.