Crates.io | qpl |
lib.rs | qpl |
version | 0.2.1 |
source | src |
created_at | 2022-10-14 04:56:59.220204 |
updated_at | 2022-11-20 18:41:26.451012 |
description | Quigly's Platform Layer |
homepage | |
repository | https://github.com/quigly/qpl |
max_upload_size | |
id | 687936 |
size | 56,067 |
QPL is a platform abstraction library. This library handles windowing, event polling, resource querying, ect.
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
}
}