Struct rich_sdl2_rust::gl_context::GlContext
source · pub struct GlContext<'window> { /* private fields */ }
Expand description
An OpenGL context controller.
Implementations§
source§impl<'window> GlContext<'window>
impl<'window> GlContext<'window>
sourcepub fn new(window: &'window Window<'_>) -> Option<Self>
pub fn new(window: &'window Window<'_>) -> Option<Self>
Constructs from a reference to Window
, or Err
on failure.
sourcepub fn drawable_size(&self) -> Size
pub fn drawable_size(&self) -> Size
Returns the size that can be used to draw.
sourcepub fn supported_extension(&self, name: &'static str) -> bool
pub fn supported_extension(&self, name: &'static str) -> bool
sourcepub fn unload_lib_all(&self)
pub fn unload_lib_all(&self)
Unloads all of loaded libraries.
sourcepub unsafe fn proc_address(&self, proc: &str) -> *mut c_void
pub unsafe fn proc_address(&self, proc: &str) -> *mut c_void
Trait Implementations§
source§impl BufferExt for GlContext<'_>
impl BufferExt for GlContext<'_>
source§fn set_swap_interval(&self, interval_kind: IntervalKind) -> Result<()>
fn set_swap_interval(&self, interval_kind: IntervalKind) -> Result<()>
Sets the interval mode of swapping buffers. Read more
source§fn swap_buffer(&self)
fn swap_buffer(&self)
Swaps buffers immediately.
Auto Trait Implementations§
impl<'window> !RefUnwindSafe for GlContext<'window>
impl<'window> !Send for GlContext<'window>
impl<'window> !Sync for GlContext<'window>
impl<'window> Unpin for GlContext<'window>
impl<'window> !UnwindSafe for GlContext<'window>
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