Struct glutin::HeadlessContext
source · pub struct HeadlessContext { /* private fields */ }
Expand description
Represents a headless OpenGL context.
Trait Implementations§
source§impl GlContext for HeadlessContext
impl GlContext for HeadlessContext
source§unsafe fn make_current(&self) -> Result<(), ContextError>
unsafe fn make_current(&self) -> Result<(), ContextError>
Creates a new OpenGL context Sets the context as the current context.
source§fn is_current(&self) -> bool
fn is_current(&self) -> bool
Returns true if this context is the current one in this thread.
source§fn get_proc_address(&self, addr: &str) -> *const ()
fn get_proc_address(&self, addr: &str) -> *const ()
Returns the address of an OpenGL function.
Contrary to wglGetProcAddress
, all available OpenGL functions return an address.
source§fn get_api(&self) -> Api
fn get_api(&self) -> Api
Returns the API that is currently provided by this window.
See Window::get_api
for more infos.
source§fn swap_buffers(&self) -> Result<(), ContextError>
fn swap_buffers(&self) -> Result<(), ContextError>
Swaps the buffers in case of double or triple buffering. Read more
source§fn get_pixel_format(&self) -> PixelFormat
fn get_pixel_format(&self) -> PixelFormat
Returns the pixel format of the main framebuffer of the context.
source§fn resize(&self, _size: PhysicalSize)
fn resize(&self, _size: PhysicalSize)
Resize the GL context. Read more
source§impl GlContextExt for HeadlessContext
impl GlContextExt for HeadlessContext
Auto Trait Implementations§
impl RefUnwindSafe for HeadlessContext
impl Send for HeadlessContext
impl Sync for HeadlessContext
impl Unpin for HeadlessContext
impl UnwindSafe for HeadlessContext
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.