Skip to content

Commit

Permalink
Remove unused dep
Browse files Browse the repository at this point in the history
  • Loading branch information
james-j-obrien committed Nov 4, 2023
1 parent 4254126 commit e1c33dc
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 31 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ bevy = { version = "0.12" , default-features = false, features = [
]}
bitfield = "0.14.0"
bitflags = "2.3"
bytemuck = "1.13.1"
smallvec = "1.10.0"
smallvec = "1.11.1"
wgpu = "0.17.1"
24 changes: 6 additions & 18 deletions src/render/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ pub fn prepare_shape_view_bind_groups(
let view_bind_group = render_device.create_bind_group(
"shape_view_bind_group",
&shape_pipeline.view_layout,
&[BindGroupEntry {
binding: 0,
resource: view_binding.clone(),
}],
&BindGroupEntries::single(view_binding.clone()),
);

commands.entity(entity).insert(ShapeViewBindGroup {
Expand Down Expand Up @@ -85,16 +82,10 @@ pub fn prepare_shape_texture_bind_groups(
render_device.create_bind_group(
"shape_texture_bind_group",
&shape_pipelines.texture_layout,
&[
BindGroupEntry {
binding: 0,
resource: BindingResource::TextureView(&gpu_image.texture_view),
},
BindGroupEntry {
binding: 1,
resource: BindingResource::Sampler(&gpu_image.sampler),
},
],
&BindGroupEntries::sequential((
&gpu_image.texture_view,
&gpu_image.sampler,
)),
)
});
}
Expand All @@ -119,10 +110,7 @@ pub fn prepare_shape_bind_group<T: ShapeData + 'static>(
value: render_device.create_bind_group(
"shape_bind_group",
&pipeline.layout,
&[BindGroupEntry {
binding: 0,
resource: binding,
}],
&BindGroupEntries::single(binding),
),
_marker: PhantomData::<T>,
});
Expand Down
3 changes: 1 addition & 2 deletions src/shapes/disc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use bevy::{
core::{Pod, Zeroable},
prelude::*,
reflect::Reflect,
render::render_resource::{ShaderRef, ShaderType},
Expand Down Expand Up @@ -113,7 +112,7 @@ impl Default for Disc {
}

/// Raw data sent to the disc shader to draw a disc
#[derive(Clone, Copy, Reflect, Pod, Zeroable, Default, Debug, ShaderType)]
#[derive(Clone, Copy, Reflect, Default, Debug, ShaderType)]
#[repr(C)]
pub struct DiscData {
transform: [[f32; 4]; 4],
Expand Down
3 changes: 1 addition & 2 deletions src/shapes/line.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use bevy::{
core::{Pod, Zeroable},
prelude::*,
reflect::Reflect,
render::render_resource::{ShaderRef, ShaderType},
Expand Down Expand Up @@ -79,7 +78,7 @@ impl ShapeComponent for Line {
}

/// Raw data sent to the line shader to draw a line
#[derive(Clone, Copy, Reflect, Pod, Zeroable, Default, Debug, ShaderType)]
#[derive(Clone, Copy, Reflect, Default, Debug, ShaderType)]
#[repr(C)]
pub struct LineData {
transform: [[f32; 4]; 4],
Expand Down
3 changes: 1 addition & 2 deletions src/shapes/rectangle.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use bevy::{
core::{Pod, Zeroable},
prelude::*,
reflect::Reflect,
render::render_resource::{ShaderRef, ShaderType},
Expand Down Expand Up @@ -79,7 +78,7 @@ impl Default for Rectangle {
}

/// Raw data sent to the rectangle shader to draw a rectangle
#[derive(Clone, Copy, Reflect, Pod, Zeroable, Default, Debug, ShaderType)]
#[derive(Clone, Copy, Reflect, Default, Debug, ShaderType)]
#[repr(C)]
pub struct RectData {
transform: [[f32; 4]; 4],
Expand Down
3 changes: 1 addition & 2 deletions src/shapes/regular_polygon.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use bevy::{
core::{Pod, Zeroable},
prelude::*,
reflect::Reflect,
render::render_resource::{ShaderRef, ShaderType},
Expand Down Expand Up @@ -86,7 +85,7 @@ impl Default for RegularPolygon {
}

/// Raw data sent to the regular polygon shader to draw a regular polygon
#[derive(Clone, Copy, Reflect, Pod, Zeroable, Default, Debug, ShaderType)]
#[derive(Clone, Copy, Reflect, Default, Debug, ShaderType)]
#[repr(C)]
pub struct NgonData {
transform: [[f32; 4]; 4],
Expand Down
3 changes: 1 addition & 2 deletions src/shapes/triangle.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use bevy::{
core::{Pod, Zeroable},
math::vec2,
prelude::*,
reflect::Reflect,
Expand Down Expand Up @@ -82,7 +81,7 @@ impl Default for Triangle {
}

/// Raw data sent to the triangle shader to draw a triangle
#[derive(Clone, Copy, Reflect, Pod, Zeroable, Default, Debug, ShaderType)]
#[derive(Clone, Copy, Reflect, Default, Debug, ShaderType)]
#[repr(C)]
pub struct TriangleData {
transform: [[f32; 4]; 4],
Expand Down

0 comments on commit e1c33dc

Please sign in to comment.