Add is_current function

This commit is contained in:
Pierre Krieger 2015-03-04 07:38:55 +01:00
parent 41e3328ca7
commit 689ace8b25
9 changed files with 47 additions and 0 deletions

View file

@ -47,6 +47,10 @@ impl HeadlessContext {
}
}
pub fn is_current(&self) -> bool {
unsafe { ffi::OSMesaGetCurrentContext() == self.context }
}
pub fn get_proc_address(&self, addr: &str) -> *const () {
unsafe {
with_c_str(addr, |s| {