Fix a mistake with aspect calculation
This commit is contained in:
parent
229fafbd9c
commit
47297146cf
|
@ -229,7 +229,7 @@ impl Renderer {
|
||||||
self.perspective_matrix = cgmath::Matrix4::from(
|
self.perspective_matrix = cgmath::Matrix4::from(
|
||||||
cgmath::PerspectiveFov {
|
cgmath::PerspectiveFov {
|
||||||
fovy: cgmath::Rad::from(cgmath::Deg{s: 90f32}),
|
fovy: cgmath::Rad::from(cgmath::Deg{s: 90f32}),
|
||||||
aspect: (width / height) as f32,
|
aspect: (width as f32 / height as f32),
|
||||||
near: 0.1f32,
|
near: 0.1f32,
|
||||||
far: 500.0f32,
|
far: 500.0f32,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue