5 use mandelwow_lib::Cube;
6 use mandelwow_lib::bounding_box::*;
9 fn bench_bounding_box(b: &mut test::Bencher) {
10 let events_loop = glium::glutin::EventsLoop::new();
11 let window = glium::glutin::WindowBuilder::new();
12 let context = glium::glutin::ContextBuilder::new();
13 let display = glium::Display::new(window, context, &events_loop).unwrap();
15 let program = solid_fill_program(&display);
16 let bounds = Cube { xmin: -2., xmax: 0.7, ymin: -1., ymax: 1., zmin: -1.1, zmax: 1.1 };
17 let bbox = BoundingBox::new(&display, &bounds, &program);
18 let mut frame = display.draw();
20 let mat = [[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.0f32]];
21 let uniforms = uniform! {
26 bbox.draw(&mut frame, &uniforms);
28 frame.finish().unwrap();