Enum glium::SwapBuffersError
source · 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
source§fn description(&self) -> &str
fn description(&self) -> &str
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
source§impl PartialEq<SwapBuffersError> for SwapBuffersError
impl PartialEq<SwapBuffersError> for SwapBuffersError
source§fn eq(&self, other: &SwapBuffersError) -> bool
fn eq(&self, other: &SwapBuffersError) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for SwapBuffersError
impl Eq for SwapBuffersError
impl StructuralEq for SwapBuffersError
impl StructuralPartialEq for SwapBuffersError
Auto Trait Implementations§
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> Content for Twhere
T: Copy,
impl<T> Content for Twhere T: Copy,
source§fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
fn read<F, E>(size: usize, f: F) -> Result<T, E>where F: FnOnce(&mut T) -> Result<(), E>,
Owned
.