Add is_current function
This commit is contained in:
parent
41e3328ca7
commit
689ace8b25
9 changed files with 47 additions and 0 deletions
|
|
@ -61,6 +61,11 @@ impl HeadlessContext {
|
|||
unimplemented!()
|
||||
}
|
||||
|
||||
/// See the docs in the crate root file.
|
||||
pub fn is_current(&self) -> bool {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// See the docs in the crate root file.
|
||||
pub fn get_proc_address(&self, _addr: &str) -> *const () {
|
||||
unimplemented!()
|
||||
|
|
@ -312,6 +317,10 @@ impl Window {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_current(&self) -> bool {
|
||||
unsafe { ffi::egl::GetCurrentContext() == self.context }
|
||||
}
|
||||
|
||||
pub fn get_proc_address(&self, addr: &str) -> *const () {
|
||||
let addr = CString::from_slice(addr.as_bytes());
|
||||
let addr = addr.as_ptr();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue