#piston #piston-game-engine

pistoncore-glfw_window

A GLFW window back-end for the Piston game engine

81 breaking releases

Uses old Rust 2015

0.81.0 May 22, 2024
0.80.0 Nov 14, 2023
0.79.0 Sep 26, 2023
0.78.0 Feb 25, 2023
0.0.7 Feb 24, 2015

#2270 in Game dev

Download history 45/week @ 2024-07-03 5/week @ 2024-07-10 1/week @ 2024-08-21 7/week @ 2024-08-28 1/week @ 2024-09-11 39/week @ 2024-09-18 43/week @ 2024-09-25 9/week @ 2024-10-02 2/week @ 2024-10-09

93 downloads per month
Used in 2 crates

MIT license

59KB
568 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.3–3.5MB
~73K SLoC