retrovnc/crates/letsplay_gpu/build.rs

29 lines
644 B
Rust
Raw Permalink Normal View History

2025-01-06 15:21:48 -05:00
use gl_generator::{Api, Fallbacks, Profile, Registry, StaticGenerator};
use std::env;
use std::fs::File;
use std::path::Path;
fn main() {
// EGL
let dest = env::var("OUT_DIR").unwrap();
let mut file = File::create(&Path::new(&dest).join("egl_bindings.rs")).unwrap();
Registry::new(
Api::Egl,
(1, 5),
Profile::Core,
Fallbacks::All,
[
"EGL_EXT_platform_base",
"EGL_EXT_device_base",
// This allows getting OpenGL APIs via eglGetProcAddress()
"EGL_KHR_get_all_proc_addresses",
"EGL_KHR_client_get_all_proc_addresses",
"EGL_EXT_platform_device",
],
)
.write_bindings(StaticGenerator, &mut file)
.unwrap();
}