pub struct GlContext { /* private fields */ }Expand description
A CGL context.
Implementations§
Trait Implementations§
Source§impl IGlContext for GlContext
impl IGlContext for GlContext
Source§fn make_current(&self) -> Rc<dyn IDisposable>
fn make_current(&self) -> Rc<dyn IDisposable>
§Panics
Panics when the context is lost and when the native context cannot be made current.
§Panics
Panics when context is not a context of this backend (the failing
cast of the original).
Creates a context that shares its objects with this one (with the
context this one shares with, when it does). The preferred versions
are not used, as in the original. A failure is logged and gives
None (the original throws), as for the contexts of GLX and EGL.
Source§fn gl_interface(&self) -> Rc<GlInterface>
fn gl_interface(&self) -> Rc<GlInterface>
The entry points of the context.
Source§fn sample_count(&self) -> i32
fn sample_count(&self) -> i32
The number of samples of the default framebuffer.
Source§fn stencil_size(&self) -> i32
fn stencil_size(&self) -> i32
The number of stencil bits of the default framebuffer.
Whether
create_shared_context is
supported.Source§impl IOptionalFeatureProvider for GlContext
impl IOptionalFeatureProvider for GlContext
Source§impl IPlatformGraphicsContext for GlContext
impl IPlatformGraphicsContext for GlContext
Source§fn ensure_current(&self) -> Rc<dyn IDisposable>
fn ensure_current(&self) -> Rc<dyn IDisposable>
Makes the context current. Disposing the result restores the
previously current context.
Auto Trait Implementations§
impl !Freeze for GlContext
impl !RefUnwindSafe for GlContext
impl !Send for GlContext
impl !Sync for GlContext
impl !UnwindSafe for GlContext
impl Unpin for GlContext
impl UnsafeUnpin for GlContext
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more