safex11/build.rs

19 lines
464 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;
2020-06-30 20:56:26 +00:00
#[cfg(feature = "glx")]
2020-06-30 07:19:48 +00:00
use gl_generator::{Api, Fallbacks, GlobalGenerator, Profile, Registry};
fn main() {
2023-08-20 09:50:59 +00:00
#[cfg(feature = "glx")]
{
let dest = env::var("OUT_DIR").unwrap();
let mut file = File::create(&Path::new(&dest).join("bindings.rs")).unwrap();
2020-06-30 07:19:48 +00:00
2023-08-20 09:50:59 +00:00
Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
.write_bindings(GlobalGenerator, &mut file)
.unwrap();
}
2020-06-30 07:19:48 +00:00
}