mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-06 02:48:27 +00:00
Inline redundant trait
This commit is contained in:
parent
07968c7bff
commit
fd9a6161fc
@ -48,7 +48,9 @@ impl Renderer {
|
||||
let transform_buffer =
|
||||
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||
label: None,
|
||||
contents: bytemuck::cast_slice(&[Uniforms::default()]),
|
||||
contents: bytemuck::cast_slice(&[Uniforms::from_transform(
|
||||
default_transform(),
|
||||
)]),
|
||||
usage: wgpu::BufferUsages::UNIFORM,
|
||||
});
|
||||
|
||||
@ -296,12 +298,6 @@ impl Uniforms {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Uniforms {
|
||||
fn default() -> Self {
|
||||
Self::from_transform(default_transform())
|
||||
}
|
||||
}
|
||||
|
||||
fn default_transform() -> Mat4 {
|
||||
let fov_y_radians = std::f32::consts::PI / 2.;
|
||||
let aspect_ratio = 1.;
|
||||
|
Loading…
Reference in New Issue
Block a user