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/headless.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/headless.rs') diff --git a/src/headless.rs b/src/headless.rs index a38c194..5106a7b 100644 --- a/src/headless.rs +++ b/src/headless.rs @@ -77,6 +77,12 @@ impl HeadlessContext { pub unsafe fn make_current(&self) { self.context.make_current() } + + /// Returns true if this context is the current one in this thread. + #[inline] + pub fn is_current(&self) -> bool { + self.context.is_current() + } /// Returns the address of an OpenGL function. /// -- cgit v1.2.3