thanks, jk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
891 B

  1. extern crate glium;
  2. extern crate glutin;
  3. extern crate textium;
  4. use glium::Surface;
  5. fn main() {
  6. let mut events_loop = glutin::EventsLoop::new();
  7. let window = glutin::WindowBuilder::new()
  8. .with_title("Hello, world!")
  9. .with_dimensions(1024, 768);
  10. let context = glutin::ContextBuilder::new().with_vsync(true);
  11. let display = glium::Display::new(window, context, &events_loop).unwrap();
  12. let mut closed = false;
  13. while !closed {
  14. let mut frame = display.draw();
  15. frame.clear_color(0., 0., 1., 1.);
  16. frame.finish().unwrap();
  17. events_loop.poll_events(|ev| {
  18. match ev {
  19. glutin::Event::WindowEvent { event, .. } => match event {
  20. glutin::WindowEvent::Closed => closed = true,
  21. _ => (),
  22. },
  23. _ => (),
  24. }
  25. });
  26. }
  27. }