easydrm 0.2.0

GLFW-inspired abstraction over DRM/KMS, GBM, and EGL/OpenGL that lets you build fullscreen Linux applications without a compositor (no X11, no Wayland).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use gl_generator::{Api, Fallbacks, Profile, Registry, StructGenerator};
use std::env;
use std::fs::File;
use std::path::Path;

fn main() {
    let dest = env::var("OUT_DIR").unwrap();
    let mut file = File::create(Path::new(&dest).join("gl_bindings.rs")).unwrap();

    Registry::new(Api::Gles2, (3, 3), Profile::Core, Fallbacks::All, [
	    "GL_OES_EGL_image",
	    "GL_OES_EGL_image_external",
	    "GL_EXT_memory_object_fd",
	    "GL_EXT_semaphore_fd"
    ])
        .write_bindings(StructGenerator, &mut file)
        .unwrap();
}