Struct glutin::HeadlessContext
source · pub struct HeadlessContext { /* private fields */ }
Expand description
Represents a headless OpenGL context.
Implementations§
source§impl HeadlessContext
impl HeadlessContext
sourcepub unsafe fn make_current(&self) -> Result<(), ContextError>
pub unsafe fn make_current(&self) -> Result<(), ContextError>
Creates a new OpenGL context Sets the context as the current context.
sourcepub fn is_current(&self) -> bool
pub fn is_current(&self) -> bool
Returns true if this context is the current one in this thread.
sourcepub fn get_proc_address(&self, addr: &str) -> *const ()
pub 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.
sourcepub fn get_api(&self) -> Api
pub fn get_api(&self) -> Api
Returns the API that is currently provided by this window.
See Window::get_api
for more infos.
pub fn set_window_resize_callback(&mut self, _: Option<fn(_: u32, _: u32)>)
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>
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.
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.
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