mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-18 15:41:07 +00:00
23 lines
619 B
Rust
23 lines
619 B
Rust
|
#[cfg(feature = "gl")]
|
||
|
fn generate_gl_bindings() {
|
||
|
let dest = std::path::PathBuf::from(&std::env::var("OUT_DIR").unwrap());
|
||
|
let mut file = std::fs::File::create(&dest.join("test_gl_bindings.rs")).unwrap();
|
||
|
gl_generator::Registry::new(
|
||
|
gl_generator::Api::Gles2,
|
||
|
(3, 0),
|
||
|
gl_generator::Profile::Core,
|
||
|
gl_generator::Fallbacks::All,
|
||
|
[],
|
||
|
)
|
||
|
.write_bindings(gl_generator::StructGenerator, &mut file)
|
||
|
.unwrap();
|
||
|
}
|
||
|
|
||
|
#[cfg(not(feature = "gl"))]
|
||
|
fn generate_gl_bindings() {}
|
||
|
|
||
|
fn main() {
|
||
|
println!("cargo:rerun-if-changed=build.rs");
|
||
|
generate_gl_bindings();
|
||
|
}
|