Add is_current function
This commit is contained in:
parent
41e3328ca7
commit
689ace8b25
9 changed files with 47 additions and 0 deletions
|
|
@ -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| {
|
||||
|
|
|
|||
|
|
@ -701,6 +701,10 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_current(&self) -> bool {
|
||||
unsafe { ffi::glx::GetCurrentContext() == self.x.context }
|
||||
}
|
||||
|
||||
pub fn get_proc_address(&self, addr: &str) -> *const () {
|
||||
use std::mem;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue