[−][src]Struct beryllium::GLContext
Handle for an OpenGL context.
General Safety
The context must be current when you call any method here.
Methods
impl<'sdl, 'win> GLContext<'sdl, 'win>
[src]
pub unsafe fn extension_supported(&self, name: &str) -> bool
[src]
Checks if the given extension is available in this context.
pub unsafe fn get_attribute(&self, attr: GLattr) -> Result<i32, String>
[src]
Obtains the actual value of the attribute for this context.
Note that the context you request and the context that you get might not match, because yay.
pub unsafe fn swap_interval(&self) -> i32
[src]
Determines the swap interval of the video display.
- 0: No vsync
- 1: Vsync
- -1: "adaptive vsync", late swaps will happen immediately
If the swap interval can't be determined this returns 0 as a "safe default". You can also call get_error to potentially find out more.
pub unsafe fn set_swap_interval(&self, interval: i32) -> Result<(), String>
[src]
Attempts to set the swap interval value.
The values work as per swap_interval.
Note that if you request adaptive vsync and get an error it is likely that standard vsync might still be available as a fallback.
pub fn is_current(&self) -> bool
[src]
Checks if this context is current.
Trait Implementations
impl<'sdl, 'win> Drop for GLContext<'sdl, 'win>
[src]
impl<'sdl, 'win> Debug for GLContext<'sdl, 'win>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,