aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32/mod.rs')
-rw-r--r--src/win32/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index 327b71d..8cb6d39 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -209,6 +209,11 @@ impl Window {
}
/// See the docs in the crate root file.
+ pub fn is_current(&self) -> bool {
+ unsafe { gl::wgl::GetCurrentContext() == self.context.0 as *const libc::c_void }
+ }
+
+ /// See the docs in the crate root file.
pub fn get_proc_address(&self, addr: &str) -> *const () {
let addr = CString::new(addr.as_bytes()).unwrap();
let addr = addr.as_ptr();