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

#5 in #gfx-rs

Download history 708/week @ 2024-01-26 385/week @ 2024-02-02 1051/week @ 2024-02-09 1144/week @ 2024-02-16 1088/week @ 2024-02-23 1086/week @ 2024-03-01 1493/week @ 2024-03-08 1152/week @ 2024-03-15 1370/week @ 2024-03-22 1606/week @ 2024-03-29 1211/week @ 2024-04-05 1381/week @ 2024-04-12 1413/week @ 2024-04-19 1398/week @ 2024-04-26 1274/week @ 2024-05-03 882/week @ 2024-05-10

5,214 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–12MB
~124K SLoC