Crates.io | pistoncore-glfw_window |
lib.rs | pistoncore-glfw_window |
version | 0.81.0 |
source | src |
created_at | 2015-02-24 13:38:11.734823 |
updated_at | 2024-05-22 00:16:17.973722 |
description | A GLFW window back-end for the Piston game engine |
homepage | https://github.com/pistondevelopers/glfw_window |
repository | https://github.com/pistondevelopers/glfw_window.git |
max_upload_size | |
id | 1461 |
size | 88,968 |
A GLFW window back-end for the Piston game engine.
Maintainers: @TyOverby, @bvssvni, @Coeuvre
let mut window: GlfwWindow = WindowSettings::new("GLFW Window", (640, 480))
.fullscreen(false)
.vsync(true)
.build()
.unwrap();
See the examples for more ways to create a window.
After you have created a window, do the following:
let mut device = gfx::GlDevice::new(|s|
self.window.get_proc_address(s)
);
let (w, h) = window.get_size();
let frame = gfx::Frame::new(w as u16, h as u16);