pistoncore-sdl2_window 0.9.1

A SDL2 back-end for the Piston game engine
docs.rs failed to build pistoncore-sdl2_window-0.9.1
Please check the build logs and, if you believe this is docs.rs' fault, open an issue.
Visit the last successful build: pistoncore-sdl2_window-0.64.0

sdl2_window Build Status

An SDL2 back-end for the Piston game engine

Maintainers: @TyOverby, @bvssvni, @Coeuvre

How to contribute


To use this as a dependency, add the following code to your Cargo.toml file:

    git = "https://github.com/PistonDevelopers/sdl2_window"

How to create a window

let mut window = Sdl2Window::new(
    WindowSettings {
        title: "My application".to_string(),
        size: [640, 480],
        fullscreen: false,
        exit_on_esc: true,
        samples: 4,

How to set up Gfx

After you have created a window, do the following:

use quack::Get;

let mut device = gfx::GlDevice::new(|s| unsafe {
let Size([w, h]) = window.get();
let frame = gfx::Frame::new(w as u16, h as u16);