safex11/build.rs

15 lines
410 B
Rust
Raw Normal View History

2020-06-30 07:19:48 +00:00
use std::env;
use std::fs::File;
use std::path::Path;
use gl_generator::{Api, Fallbacks, GlobalGenerator, Profile, Registry};
fn main() {
let dest = env::var("OUT_DIR").unwrap();
let mut file = File::create(&Path::new(&dest).join("bindings.rs")).unwrap();
Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
.write_bindings(GlobalGenerator, &mut file)
.unwrap();
}