X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=benches%2Fbounding_box.rs;h=54351d9534c674f92e907cf70eed81dd6203e8db;hb=db8dabba713ca281b3c8c49642eccf5a6f0af250;hp=277435c954d56515b401fbd6ad132ff2ad88607e;hpb=ddc6dcf1404bd232db94e76d92b2144eacc3e46e;p=mandelwow.git diff --git a/benches/bounding_box.rs b/benches/bounding_box.rs index 277435c..54351d9 100644 --- a/benches/bounding_box.rs +++ b/benches/bounding_box.rs @@ -1,18 +1,17 @@ #![feature(test)] - -extern crate mandelwow_lib; -extern crate glutin; -#[macro_use(uniform)] -extern crate glium; extern crate test; +use glium::uniform; use mandelwow_lib::Cube; use mandelwow_lib::bounding_box::*; -use glium::DisplayBuild; #[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);