From: Bernie Innocenti Date: Mon, 8 May 2017 03:34:39 +0000 (-0400) Subject: Make the shaded_cube benchmark actually draw the cube on the screen. X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=f85850e61b38f388a3cf236343282d90872dec3f;p=mandelwow.git Make the shaded_cube benchmark actually draw the cube on the screen. --- diff --git a/benches/shaded_cube.rs b/benches/shaded_cube.rs index 8ea5a0e..ea4e5ea 100644 --- a/benches/shaded_cube.rs +++ b/benches/shaded_cube.rs @@ -18,10 +18,11 @@ fn bench_shaded_cube(b: &mut test::Bencher) { let cube = ShadedCube::new(&display, &bounds, &program); let mut frame = display.draw(); b.iter(|| { - let mat = [[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.0f32]]; + let model = [[0.7, 0.5, -0.5, 0.0], [0.0, 0.7, 0.7, 0.0], [0.7, -0.5, 0.5, 0.0], [0., 0., -3.0, 1.0f32]]; + let perspview = [[0.5, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, -1.0, -1.0], [0., 0., -0.2, 0.0f32]]; let uniforms = uniform! { - model: mat, - viewpersp: mat, + model: model, + perspview: perspview, }; cube.draw(&mut frame, &uniforms); });