Struct glutin::HeadlessContext
[−]
[src]
pub struct HeadlessContext { // some fields omitted }
Represents a headless OpenGL context.
Methods
impl HeadlessContext
[src]
unsafe fn make_current(&self) -> Result<(), ContextError>
[−]
Creates a new OpenGL context Sets the context as the current context.
fn is_current(&self) -> bool
[−]
Returns true if this context is the current one in this thread.
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.
fn get_api(&self) -> Api
[−]
Returns the API that is currently provided by this window.
See Window::get_api
for more infos.
fn set_window_resize_callback(&mut self, _: Option<fn(u32, u32)>)
Trait Implementations
impl GlContext for HeadlessContext
[src]
unsafe fn make_current(&self) -> Result<(), ContextError>
[−]
Sets the context as the current context.
fn is_current(&self) -> bool
[−]
Returns true if this context is the current one in this thread.
fn get_proc_address(&self, addr: &str) -> *const ()
[−]
Returns the address of an OpenGL function.
fn swap_buffers(&self) -> Result<(), ContextError>
[−]
Swaps the buffers in case of double or triple buffering. Read more
fn get_api(&self) -> Api
[−]
Returns the OpenGL API being used.
fn get_pixel_format(&self) -> PixelFormat
[−]
Returns the pixel format of the main framebuffer of the context.