pub enum SwapBuffersError {
ContextLost,
AlreadySwapped,
}
Expand description
Error that can happen when swapping buffers.
Variants§
ContextLost
The OpenGL context has been lost and needs to be recreated. The Display
and all the
objects associated to it (textures, buffers, programs, etc.) need to be recreated from
scratch.
Operations will have no effect. Functions that read textures, buffers, etc. from OpenGL will return uninitialized data instead.
A context loss usually happens on mobile devices when the user puts the application on
sleep and wakes it up later. However any OpenGL implementation can theoretically lose the
context at any time. Can only happen if calling is_context_loss_possible()
returns true.
AlreadySwapped
The buffers have already been swapped.
This error can be returned when set_finish()
is called multiple times, or finish()
is
called after set_finish()
.
Trait Implementations§
source§impl Clone for SwapBuffersError
impl Clone for SwapBuffersError
source§fn clone(&self) -> SwapBuffersError
fn clone(&self) -> SwapBuffersError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SwapBuffersError
impl Debug for SwapBuffersError
source§impl Display for SwapBuffersError
impl Display for SwapBuffersError
source§impl Error for SwapBuffersError
impl Error for SwapBuffersError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl PartialEq for SwapBuffersError
impl PartialEq for SwapBuffersError
impl Copy for SwapBuffersError
impl Eq for SwapBuffersError
impl StructuralPartialEq for SwapBuffersError
Auto Trait Implementations§
impl Freeze for SwapBuffersError
impl RefUnwindSafe for SwapBuffersError
impl Send for SwapBuffersError
impl Sync for SwapBuffersError
impl Unpin for SwapBuffersError
impl UnwindSafe for SwapBuffersError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.