[][src]Macro glamour::gl_call

macro_rules! gl_call {
    ($gl_fn:expr) => { ... };
}

A wrapper for an unsafe OpenGL call that will panic! if any OpenGL errors exist.

Panics

Panics if any OpenGL errors exist. Will only panic! when debug_assertions is true.

Examples

let mut id = 0;
gl_call!(gl::GenBuffers(1, &mut id));
assert_ne!(id, 0);