17 unstable releases

0.2.1 Nov 20, 2022
0.2.0 Nov 5, 2022
0.1.0 Oct 14, 2022
0.0.3 Oct 15, 2022

#545 in Graphics APIs

Download history 1/week @ 2024-03-11 5/week @ 2024-04-01

297 downloads per month
Used in qrl

MIT license

55KB
2K SLoC

QPL - Quigly's Platform Layer

QPL is a platform abstraction library. This library handles windowing, event polling, resource querying, ect.

Usage

fn main()
{
    qpl::init();

    let mut window = qpl::create_window(&qpl::WindowCreateInfo
    {
        width: 1280,
        height: 720,
        title: "My Application",
        mode: qpl::WindowMode::Windowed,
        resizable: false,
        ..Default::default()
    });

    while !window.should_close
    {
        window.update_input_state();

        'event_loop: loop
        {
            match window.poll_events()
            {
                Some(event) =>
                {
                    match event
                    {
                        qpl::Event::Quit =>
                        {
                            window.should_close = true;
                            break 'event_loop;
                        },
                        _ => {}
                    }
                },
                None =>
                {
                    break 'event_loop;
                }
            }
        }

        // do your update and rendering
    }
}

Supported platforms

Currently implemented

  • Windows
  • Linux

Planned

  • Web assembly
  • MacOS
  • Android
  • iOS

Dependencies

~5.5MB
~129K SLoC