aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-03-04 07:38:55 +0100
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-03-04 07:43:55 +0100
commit689ace8b251ceb2446fc460aad3dd19a1692f3f8 (patch)
tree2035d5b289c4838e477cbea653c6e9e4b05a0afa /src/window.rs
parent41e3328ca7d271b1291996dec9e59830d917ee2c (diff)
downloadglutin-689ace8b251ceb2446fc460aad3dd19a1692f3f8.tar.gz
glutin-689ace8b251ceb2446fc460aad3dd19a1692f3f8.zip
Add is_current function
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.