#glfw #window #piston

pistoncore-glfw_window

A GLFW window back-end for the Piston game engine

68 breaking releases

Uses old Rust 2015

0.68.0 Aug 8, 2020
0.67.0 Jul 18, 2020
0.66.0 May 31, 2020
0.64.0 Feb 11, 2020
0.0.7 Feb 24, 2015

#2 in #glfw

Download history 176/week @ 2020-05-27 161/week @ 2020-06-03 22/week @ 2020-06-10 87/week @ 2020-06-17 23/week @ 2020-06-24 156/week @ 2020-07-01 10/week @ 2020-07-08 171/week @ 2020-07-15 22/week @ 2020-07-22 18/week @ 2020-07-29 31/week @ 2020-08-05 253/week @ 2020-08-12 123/week @ 2020-08-19 192/week @ 2020-08-26 195/week @ 2020-09-02 109/week @ 2020-09-09

361 downloads per month
Used in rsui

MIT license

58KB
448 lines

glfw_window Build Status

A GLFW window back-end for the Piston game engine.

Maintainers: @TyOverby, @bvssvni, @Coeuvre

How to contribute

How to create a window

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.

How to set up Gfx

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);

Troubleshooting

Dependencies

dependencies


lib.rs:

A GLFW window back-end for the Piston game engine.

Dependencies

~2–3MB
~66K SLoC