mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-28 20:41:31 +00:00
22 lines
618 B
Rust
22 lines
618 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();
|
|
}
|