From 689ace8b251ceb2446fc460aad3dd19a1692f3f8 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 4 Mar 2015 07:38:55 +0100 Subject: Add is_current function --- src/window.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/window.rs') diff --git a/src/window.rs b/src/window.rs index 6b2269f..1bab245 100644 --- a/src/window.rs +++ b/src/window.rs @@ -329,6 +329,12 @@ impl Window { self.window.make_current() } + /// Returns true if this context is the current one in this thread. + #[inline] + pub fn is_current(&self) -> bool { + self.window.is_current() + } + /// Returns the address of an OpenGL function. /// /// Contrary to `wglGetProcAddress`, all available OpenGL functions return an address. -- cgit v1.2.3