Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
bitshifter committed May 26, 2018
1 parent 5ea429b commit 1d09104
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ impl Camera {
let v = cross(w, u);
Camera {
origin: lookfrom,
lower_left_corner: lookfrom - half_width * focus_dist * u - half_height * focus_dist * v
lower_left_corner: lookfrom
- half_width * focus_dist * u
- half_height * focus_dist * v
- focus_dist * w,
horizontal: 2.0 * half_width * focus_dist * u,
vertical: 2.0 * half_height * focus_dist * v,
Expand Down
3 changes: 2 additions & 1 deletion src/glium_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ pub fn start_loop(params: Params, camera: Camera, scene: Scene, max_frames: Opti
// reading the front rgb_buffer into an image
let image: glium::texture::RawImage2d<u8> = display.read_front_buffer();
let image =
image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned()).unwrap();
image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned())
.unwrap();
let image = image::DynamicImage::ImageRgba8(image).flipv().to_rgb();
image
.save("output.png")
Expand Down

0 comments on commit 1d09104

Please sign in to comment.