<commit_before>extern crate glutin;

mod support;

fn main() {
    let events_loop = glutin::winit::EventsLoop::new();
    let window = glutin::winit::WindowBuilder::new()
        .with_title("A fantastic window!")
        .build(&events_loop)
        .unwrap();
    let context = glutin::ContextBuilder::new()
        .build(&window)
        .unwrap();

    let _ = unsafe { context.make_current() };

    println!("Pixel format of the window's GL context: {:?}", context.get_pixel_format());

    let gl = support::load(&context);

                gl.draw_frame((0.0, 1.0, 0.0, 1.0));
                let _ = context.swap_buffers();

    events_loop.run_forever(|event| {
        println!("{:?}", event);

        gl.draw_frame((0.0, 1.0, 0.0, 1.0));
        let _ = context.swap_buffers();

        match event {
            glutin::winit::Event::WindowEvent { event, .. } => match event {
                glutin::winit::WindowEvent::Closed => events_loop.interrupt(),
                glutin::winit::WindowEvent::Resized(w, h) => context.resize(w, h),
                _ => (),
            },
            _ => ()
        }<commit_msg>Remove unnecessary draw from window example (originally for testing wayland)<commit_after>extern crate glutin;

mod support;

fn main() {
    let events_loop = glutin::winit::EventsLoop::new();
    let window = glutin::winit::WindowBuilder::new()
        .with_title("A fantastic window!")
        .build(&events_loop)
        .unwrap();
    let context = glutin::ContextBuilder::new()
        .build(&window)
        .unwrap();

    let _ = unsafe { context.make_current() };

    println!("Pixel format of the window's GL context: {:?}", context.get_pixel_format());

    let gl = support::load(&context);

    events_loop.run_forever(|event| {
        println!("{:?}", event);

        gl.draw_frame((0.0, 1.0, 0.0, 1.0));
        let _ = context.swap_buffers();

        match event {
            glutin::winit::Event::WindowEvent { event, .. } => match event {
                glutin::winit::WindowEvent::Closed => events_loop.interrupt(),
                glutin::winit::WindowEvent::Resized(w, h) => context.resize(w, h),
                _ => (),
            },
            _ => ()
        }
{'fraction_non_alphanumeric': 0.16569637259292433, 'fraction_numerical': 0.010747872816838333, 'mean_word_length': 2.3593984962406016, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7204101', 'n_tokens_mistral': 720, 'n_tokens_neox': 667, 'n_words': 131}