X-Git-Url: https://codewiz.org/gitweb?p=mandelwow.git;a=blobdiff_plain;f=benches%2Fbounding_box.rs;fp=benches%2Fbounding_box.rs;h=be448a7000b02722c9469782ab6b301a2766c3e4;hp=597f215ef4598b2135f5a14ea781cb2e63fc8afa;hb=a9403c5b68afe3ad9d759bfe101c1e57bc279f13;hpb=7dcf6a9d8b10efaafa9985b40b618ccdad8d953d diff --git a/benches/bounding_box.rs b/benches/bounding_box.rs index 597f215..be448a7 100644 --- a/benches/bounding_box.rs +++ b/benches/bounding_box.rs @@ -6,13 +6,16 @@ extern crate glutin; extern crate glium; extern crate test; -use glium::DisplayBuild; use mandelwow_lib::Cube; use mandelwow_lib::bounding_box::*; #[bench] fn bench_bounding_box(b: &mut test::Bencher) { - let display = glutin::WindowBuilder::new().build_glium().unwrap(); + let events_loop = glium::glutin::EventsLoop::new(); + let window = glium::glutin::WindowBuilder::new(); + let context = glium::glutin::ContextBuilder::new(); + let display = glium::Display::new(window, context, &events_loop).unwrap(); + let program = solid_fill_program(&display); let bounds = Cube { xmin: -2., xmax: 0.7, ymin: -1., ymax: 1., zmin: -1.1, zmax: 1.1 }; let bbox = BoundingBox::new(&display, &bounds, &program);