aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs6
1 files changed, 6 insertions, 0 deletions
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.