Skip to content

Commit

Permalink
Fix into_pod usages
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynus committed Sep 20, 2019
1 parent b5045c0 commit 7a32ade
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 2 additions & 8 deletions amethyst_rendy/src/pod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ impl VertexArgs {
let model: [[f32; 4]; 4] = convert::<_, Matrix4<f32>>(*transform.global_matrix()).into();
VertexArgs {
model: model.into(),
tint: tint.map_or([1.0; 4].into(), |t| {
let (r, g, b, a) = t.0.into_components();
[r, g, b, a].into()
}),
tint: tint.map_or([1.0; 4].into(), |t| t.0.into_pod()),
}
}
}
Expand Down Expand Up @@ -160,10 +157,7 @@ impl SkinnedVertexArgs {
let model: [[f32; 4]; 4] = convert::<_, Matrix4<f32>>(*transform.global_matrix()).into();
SkinnedVertexArgs {
model: model.into(),
tint: tint.map_or([1.0; 4].into(), |t| {
let (r, g, b, a) = t.0.into_components();
[r, g, b, a].into()
}),
tint: tint.map_or([1.0; 4].into(), |t| t.0.into_pod()),
joints_offset,
}
}
Expand Down
6 changes: 2 additions & 4 deletions amethyst_tiles/src/pod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use amethyst_assets::{AssetStorage, Handle};
use amethyst_core::math::Point3;
use amethyst_rendy::{
pod::IntoPod,
rendy::{
hal::format::Format,
mesh::{AsVertex, VertexFormat},
Expand Down Expand Up @@ -97,10 +98,7 @@ impl TileArgs {
Self {
u_offset: [sprite.tex_coords.left, sprite.tex_coords.right].into(),
v_offset: [sprite.tex_coords.top, sprite.tex_coords.bottom].into(),
tint: tint.map_or([1.0; 4].into(), |t| {
let (r, g, b, a) = t.0.into_components();
[r, g, b, a].into()
}),
tint: tint.map_or([1.0; 4].into(), |t| t.0.into_pod()),
tile_coordinate: [tile_coordinate.x, tile_coordinate.y, tile_coordinate.z].into(),
},
&sprite_sheet.texture,
Expand Down

0 comments on commit 7a32ade

Please sign in to comment.