old_school_gfx_glutin_ext 0.29.1

Extensions for glutin to initialize & update old school gfx
docs.rs failed to build old_school_gfx_glutin_ext-0.29.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: old_school_gfx_glutin_ext-0.32.1

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.