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

#3 in #gfx-rs

Download history 1034/week @ 2024-10-28 936/week @ 2024-11-04 322/week @ 2024-11-11 573/week @ 2024-11-18 1124/week @ 2024-11-25 981/week @ 2024-12-02 1961/week @ 2024-12-09 1510/week @ 2024-12-16 442/week @ 2024-12-23 563/week @ 2024-12-30 1460/week @ 2025-01-06 2238/week @ 2025-01-13 1740/week @ 2025-01-20 770/week @ 2025-01-27 2813/week @ 2025-02-03 2154/week @ 2025-02-10

7,803 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
~118K SLoC