Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // create window and event loop, load opengl
  2. let mut window_size = V2I::new(800, 600);
  3. let mut events_loop = EventsLoop::new();
  4. let window = WindowBuilder::new()
  5. .with_title("gl chunk test")
  6. .with_dimensions(window_size.x as u32, window_size.y as u32);
  7. let mut context = ContextBuilder::new()
  8. .with_vsync(true);
  9. context.gl_attr.debug = true;
  10. let window = GlWindow::new(window, context, &events_loop)
  11. .expect("window creation failure");
  12. window.make_current().unwrap();
  13.  
  14. gl::load_with(|sym| window.get_proc_address(sym) as *const _);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement