31 breaking releases

Uses old Rust 2015

0.31.0 Apr 25, 2019
0.30.0 Mar 11, 2019
0.29.0 Feb 12, 2019
0.28.0 Dec 4, 2018
0.3.0 Jun 19, 2015

#9 in #glutin

Download history 1201/week @ 2024-07-20 1194/week @ 2024-07-27 919/week @ 2024-08-03 2047/week @ 2024-08-10 1120/week @ 2024-08-17 1187/week @ 2024-08-24 1272/week @ 2024-08-31 1042/week @ 2024-09-07 971/week @ 2024-09-14 1346/week @ 2024-09-21 1075/week @ 2024-09-28 350/week @ 2024-10-05 783/week @ 2024-10-12 823/week @ 2024-10-19 1000/week @ 2024-10-26 1041/week @ 2024-11-02

3,660 downloads per month
Used in fewer than 20 crates

Apache-2.0

370KB
7.5K SLoC

gfx_window_glutin

Glutin window backend for gfx-rs

Usage

Make sure you have the following in your Cargo.toml:

gfx_core = "0.9"
gfx_device_gl = "0.16"
gfx_window_glutin = "0.30.0"
glutin = "0.20"

Then, initialize gfx as follows:

extern crate gfx_core;
extern crate gfx_device_gl;
extern crate gfx_window_glutin;
extern crate glutin;

use gfx_core::format::{DepthStencil, Rgba8};

fn main() {
    let events_loop = glutin::EventsLoop::new();
    let window_builder = glutin::WindowBuilder::new().with_title("Example".to_owned());
    let context = glutin::ContextBuilder::new();
    let (window, device, factory, rtv, stv) =
        gfx_window_glutin::init::<Rgba8, DepthStencil>(window_builder, context, &events_loop);

    // your code
}

Dependencies

~3–11MB
~121K SLoC