Skip to content

Instantly share code, notes, and snippets.

@seankerr
Created September 23, 2015 21:13
Show Gist options
  • Save seankerr/b6db5ef707d6f100c2e7 to your computer and use it in GitHub Desktop.
Save seankerr/b6db5ef707d6f100c2e7 to your computer and use it in GitHub Desktop.
pub fn query_string<'a>(display: EGLDisplay, name: EGLint) -> &'a CStr {
unsafe {
let c_str = ffi::eglQueryString(display, name);
if !c_str.is_null() {
CStr::from_ptr(c_str)
} else {
panic!("Could not query string".to_string())
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment