• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 Brendan Zabarauskas and the gl-rs developers
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 extern crate gl_generator;
16 
17 use gl_generator::{Api, Fallbacks, GlobalGenerator, Profile, Registry};
18 use std::env;
19 use std::fs::File;
20 use std::path::Path;
21 
main()22 fn main() {
23     let out_dir = env::var("OUT_DIR").unwrap();
24     let mut file = File::create(&Path::new(&out_dir).join("bindings.rs")).unwrap();
25 
26     Registry::new(Api::Gl, (4, 5), Profile::Core, Fallbacks::All, [])
27         .write_bindings(GlobalGenerator, &mut file)
28         .unwrap();
29 }
30