pub struct Context { /* private fields */ }Expand description
[EGL 1.0] RAII wrapper for
EGLContext.
When dropped, frees up the context with eglDestroyContext call.
Note that the surface would not be immediately freed if it is current to any thread. In such a case, the surface will be freed when it is no longer used.
Implementations§
Source§impl Context
impl Context
Sourcepub fn from_handle(
display_handle: EGLDisplay,
context_handle: EGLSurface,
) -> Context
pub fn from_handle( display_handle: EGLDisplay, context_handle: EGLSurface, ) -> Context
Create a Context from an existing EGL display and context handles.
Sourcepub fn handle(&self) -> EGLContext
pub fn handle(&self) -> EGLContext
Get raw handle.
Sourcepub fn forget(self) -> EGLContext
pub fn forget(self) -> EGLContext
Drops Context without cleaning up any resources.
Returns EGLContext handle.
Alias for Into<egl::EGLContext>.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more