#glfw #window #piston

pistoncore-glfw_window

A GLFW window back-end for the Piston game engine

64 breaking releases

new 0.64.0 Feb 11, 2020
0.62.0 Oct 16, 2019
0.59.0 Jul 24, 2019
0.49.0 Feb 7, 2019
0.0.7 Feb 24, 2015

#5 in #window

Download history 203/week @ 2019-11-01 5/week @ 2019-11-08 75/week @ 2019-11-15 88/week @ 2019-11-22 133/week @ 2019-11-29 367/week @ 2019-12-06 622/week @ 2019-12-13 2/week @ 2019-12-20 69/week @ 2019-12-27 7/week @ 2020-01-03 86/week @ 2020-01-10 152/week @ 2020-01-17 2/week @ 2020-01-24 10/week @ 2020-01-31 20/week @ 2020-02-07

540 downloads per month
Used in rsui

MIT license

58KB
447 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.1–3MB
~63K SLoC