30 breaking releases

0.30.0 Mar 11, 2019
0.28.0 Dec 4, 2018
0.27.0 Nov 13, 2018
0.25.0 Jun 29, 2018
0.3.0 Jun 19, 2015

#12 in Graphics APIs

Download history 1115/week @ 2018-11-26 1042/week @ 2018-12-03 1076/week @ 2018-12-10 952/week @ 2018-12-17 1028/week @ 2018-12-24 1309/week @ 2018-12-31 1199/week @ 2019-01-07 900/week @ 2019-01-14 1103/week @ 2019-01-21 1030/week @ 2019-01-28 996/week @ 2019-02-04 1173/week @ 2019-02-11 1317/week @ 2019-02-18 1177/week @ 2019-02-25 1497/week @ 2019-03-04

4,859 downloads per month
Used in 25 crates (24 directly)

Apache-2.0

356KB
7K 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.5MB
~65K SLoC