3 extern crate mandelwow_lib;
9 use mandelwow_lib::Cube;
10 use mandelwow_lib::bounding_box::*;
11 use glium::DisplayBuild;
14 fn bench_bounding_box(b: &mut test::Bencher) {
15 let display = glutin::WindowBuilder::new().build_glium().unwrap();
16 let program = solid_fill_program(&display);
17 let bounds = Cube { xmin: -2., xmax: 0.7, ymin: -1., ymax: 1., zmin: -1.1, zmax: 1.1 };
18 let bbox = BoundingBox::new(&display, &bounds, &program);
19 let mut frame = display.draw();
21 let mat = [[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.0f32]];
22 let uniforms = uniform! {
27 bbox.draw(&mut frame, &uniforms);
29 frame.finish().unwrap();