From f85850e61b38f388a3cf236343282d90872dec3f Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sun, 7 May 2017 23:34:39 -0400 Subject: [PATCH] Make the shaded_cube benchmark actually draw the cube on the screen. --- benches/shaded_cube.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); }); -- 2.25.1