safex11/build.rs
2023-08-20 04:53:05 -05:00

14 lines
409 B
Rust

#[cfg(feature = "glx")]
use gl_generator::{Api, Fallbacks, GlobalGenerator, Profile, Registry};
fn main() {
#[cfg(feature = "glx")]
{
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();
}
}