31 breaking releases

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

#38 in Game development

Download history 1833/week @ 2019-08-01 1292/week @ 2019-08-08 960/week @ 2019-08-15 1386/week @ 2019-08-22 1653/week @ 2019-08-29 1902/week @ 2019-09-05 1136/week @ 2019-09-12 1475/week @ 2019-09-19 893/week @ 2019-09-26 2220/week @ 2019-10-03 1360/week @ 2019-10-10 1254/week @ 2019-10-17 1171/week @ 2019-10-24 1033/week @ 2019-10-31 1076/week @ 2019-11-07

5,663 downloads per month
Used in 34 crates (28 directly)

Apache-2.0

365KB
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

~1.7–2.6MB
~52K SLoC