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

#13 in #glutin

Download history 1911/week @ 2025-09-11 2398/week @ 2025-09-18 2632/week @ 2025-09-25 1807/week @ 2025-10-02 1746/week @ 2025-10-09 2414/week @ 2025-10-16 2052/week @ 2025-10-23 2125/week @ 2025-10-30 2151/week @ 2025-11-06 1942/week @ 2025-11-13 2113/week @ 2025-11-20 2051/week @ 2025-11-27 1905/week @ 2025-12-04 1776/week @ 2025-12-11 2216/week @ 2025-12-18 1878/week @ 2025-12-25

7,971 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

~1–4.5MB
~72K SLoC