Crates.io | ramen |
lib.rs | ramen |
version | 0.0.2 |
source | src |
created_at | 2020-06-14 23:37:04.241314 |
updated_at | 2021-02-02 18:54:31.867017 |
description | Cross-platform windowing crate, built for performance. |
homepage | |
repository | https://github.com/notviri/ramen/ |
max_upload_size | |
id | 254012 |
size | 75,732 |
Low-level windowing and video initialization for real-time graphical applications, especially video games.
use ramen::{event::Event, monitor::Size, window::Window};
// Create your window
let mut window = Window::builder()
.inner_size(Size::Logical(1280.0, 720.0))
.resizable(false)
.title("a nice window")
.build()?;
// Poll events & do your processing
'main: loop {
for event in window.events() {
match event {
Event::Close(_) => break 'main,
_ => (),
}
}
// Render graphics, process input, et cetera.
window.swap_events();
}