8000 GitHub - bebrws/gfx_window_glutin
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bebrws/gfx_window_glutin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is different with this repo?

Updated code and dependencies so that you can use the latest at the time:

glutin = "0.25.0"
winit = "0.23.0"
gfx_core = "0.9.1"
gfx_device_gl = "0.16.2"

Original repo:

gfx_window_glutin

Glutin window backend for gfx-rs

Usage

Make sure you have the following in your Cargo.toml:

glutin = "0.25.0"
winit = "0.23.0"
gfx_core = "0.9.1"
gfx_device_gl = "0.16.2"

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
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0