在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:PistonDevelopers/piston_window开源软件地址:https://github.com/PistonDevelopers/piston_window开源编程语言:Rust 100.0%开源软件介绍:piston_windowThe official Piston convenience window wrapper for the Piston game engine Notice! If this is your first time visiting Piston, start here. Piston-Window is designed for only one purpose: Convenience.
extern crate piston_window;
use piston_window::*;
fn main() {
let mut window: PistonWindow = WindowSettings::new("Hello Piston!", (640, 480))
.exit_on_esc(true)
.build()
.unwrap_or_else(|e| { panic!("Failed to build PistonWindow: {}", e) });
while let Some(e) = window.next() {
window.draw_2d(&e, |_c, g, _d| {
clear([0.5, 1.0, 0.5, 1.0], g);
});
}
}
let mut window: PistonWindow<Sdl2Window> = WindowSettings::new("Hello Piston!", [640, 480])
.exit_on_esc(true).build().unwrap();
while let Some(e) = window.next() {
if let Some(button) = e.press_args() {
// Intro.
while let Some(e) = window.next() {
...
}
}
} Ideas or feedback? Open up an issue here. Dependency graph |
2022-08-15
2022-08-17
2022-09-23
2023-10-27
2022-08-18
请发表评论