Glutin window backend for gfx-rs
Make sure you have the following in your Cargo.toml
:
toml
gfx_core = "0.8"
gfx_device_gl = "0.15"
gfx_window_glutin = "0.28.0"
glutin = "0.19"
Then, initialize gfx
as follows:
```rust extern crate gfxcore; extern crate gfxdevicegl; extern crate gfxwindow_glutin; extern crate glutin;
use gfx_core::format::{DepthStencil, Rgba8};
fn main() {
let eventsloop = glutin::EventsLoop::new();
let windowbuilder = glutin::WindowBuilder::new().withtitle("Example".toowned());
let context = glutin::ContextBuilder::new();
let (window, device, factory, rtv, stv) =
gfxwindowglutin::init::
// your code
} ```