macro_rules! gl_call {
($gl_fn:expr) => { ... };
}
A wrapper for an unsafe OpenGL call that will panic!
if any OpenGL errors exist.
Panics if any OpenGL errors exist.
Will only panic!
when debug_assertions
is true
.
let mut id = 0;
gl_call!(gl::GenBuffers(1, &mut id));
assert_ne!(id, 0);