#glfw #window #piston

pistoncore-glfw_window

A GLFW window back-end for the Piston game engine

77 breaking releases

Uses old Rust 2015

0.77.0 Nov 16, 2022
0.75.0 Feb 23, 2022
0.74.0 Nov 28, 2021
0.71.0 Jan 12, 2021
0.0.7 Feb 24, 2015

#129 in Game dev

Download history 32/week @ 2022-10-17 80/week @ 2022-10-24 109/week @ 2022-10-31 95/week @ 2022-11-07 102/week @ 2022-11-14 52/week @ 2022-11-21 43/week @ 2022-11-28 67/week @ 2022-12-05 80/week @ 2022-12-12 151/week @ 2022-12-19 41/week @ 2022-12-26 28/week @ 2023-01-02 57/week @ 2023-01-09 28/week @ 2023-01-16 96/week @ 2023-01-23 110/week @ 2023-01-30

297 downloads per month
Used in 2 crates

MIT license

59KB
567 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

~1.7–2.6MB
~55K SLoC