#gamedev #graphics #gfx #glutin

old_school_gfx_glutin_ext

Extensions for glutin to initialize & update old school gfx

11 releases (7 breaking)

Uses new Rust 2021

new 0.29.2 Aug 13, 2022
0.29.0 Jul 30, 2022
0.28.0 Dec 2, 2021
0.27.0 Jun 22, 2021
0.24.0 Mar 12, 2020

#52 in Graphics APIs

Download history 394/week @ 2022-04-25 386/week @ 2022-05-02 373/week @ 2022-05-09 496/week @ 2022-05-16 523/week @ 2022-05-23 456/week @ 2022-05-30 393/week @ 2022-06-06 341/week @ 2022-06-13 426/week @ 2022-06-20 323/week @ 2022-06-27 319/week @ 2022-07-04 515/week @ 2022-07-11 380/week @ 2022-07-18 442/week @ 2022-07-25 539/week @ 2022-08-01 773/week @ 2022-08-08

2,191 downloads per month
Used in 20 crates (5 directly)

Apache-2.0

18KB
146 lines

old_school_gfx_glutin_ext crates.io Documentation

Extensions for glutin to initialize & update old school gfx. An alternative to gfx_window_glutin.

use old_school_gfx_glutin_ext::*;

type ColorFormat = gfx::format::Srgba8;
type DepthFormat = gfx::format::DepthStencil;

// Initialize
let (window_ctx, mut device, mut factory, mut main_color, mut main_depth) =
    glutin::ContextBuilder::new()
        .with_gfx_color_depth::<ColorFormat, DepthFormat>()
        .build_windowed(window_config, &event_loop)?
        .init_gfx::<ColorFormat, DepthFormat>();

// Update, ie after a resize
window_ctx.update_gfx(&mut main_color, &mut main_depth);

Example

cargo run --example triangle

Minimum supported rust compiler

All crates maintained with latest stable rust.

Dependencies

~2.2–9MB
~168K SLoC