mirror of
https://github.com/hannobraun/Fornjot
synced 2025-07-12 13:06:07 +00:00
Update name of constructor
This commit is contained in:
parent
f1b537b6d8
commit
4a506c3adb
@ -46,7 +46,7 @@ impl Renderer {
|
|||||||
let transform_buffer =
|
let transform_buffer =
|
||||||
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
|
||||||
label: None,
|
label: None,
|
||||||
contents: bytemuck::cast_slice(&Mat4x4::identity().columns),
|
contents: bytemuck::cast_slice(&Mat4x4::perspective().columns),
|
||||||
usage: wgpu::BufferUsages::UNIFORM,
|
usage: wgpu::BufferUsages::UNIFORM,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ struct Mat4x4 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Mat4x4 {
|
impl Mat4x4 {
|
||||||
pub fn identity() -> Self {
|
pub fn perspective() -> Self {
|
||||||
let fov_y_radians = std::f32::consts::PI / 2.;
|
let fov_y_radians = std::f32::consts::PI / 2.;
|
||||||
let aspect_ratio = 1.;
|
let aspect_ratio = 1.;
|
||||||
let z_near = 0.;
|
let z_near = 0.;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user