#glfw #window #piston

pistoncore-glfw_window

A GLFW window back-end for the Piston game engine

64 breaking releases

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

#183 in Game development

Download history 4/week @ 2019-11-07 73/week @ 2019-11-14 91/week @ 2019-11-21 133/week @ 2019-11-28 72/week @ 2019-12-05 917/week @ 2019-12-12 2/week @ 2019-12-19 68/week @ 2019-12-26 7/week @ 2020-01-02 86/week @ 2020-01-09 152/week @ 2020-01-16 3/week @ 2020-01-23 9/week @ 2020-01-30 20/week @ 2020-02-06 86/week @ 2020-02-13

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