[−][src]Struct surfman_chains::SwapChain
A thread-safe swap chain.
Methods
impl SwapChain
[src]
pub fn swap_buffers(
&self,
device: &mut Device,
context: &mut Context
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Context
) -> Result<(), Error>
Swap the back and front buffers.
Called by the producer.
Returns an error if context
is not the producer context for this swap chain.
pub fn take_attachment_from(
&self,
device: &mut Device,
context: &mut Context,
other: &SwapChain
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Context,
other: &SwapChain
) -> Result<(), Error>
Swap the attached swap chain.
Called by the producer.
Returns an error if context
is not the producer context for both swap chains.
Returns an error if this swap chain is attached, or the other swap chain is detached.
pub fn resize(
&self,
device: &mut Device,
context: &mut Context,
size: Size2D<i32>
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Context,
size: Size2D<i32>
) -> Result<(), Error>
Resize the swap chain.
This creates a new back buffer of the appropriate size,
and destroys the old one.
Called by the producer.
Returns an error if context
is not the producer context for this swap chain.
pub fn size(&self) -> Size2D<i32>
[src]
Get the current size. Called by a consumer.
pub fn clear_surface(
&self,
device: &mut Device,
context: &mut Context,
gl: &Gl
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Context,
gl: &Gl
) -> Result<(), Error>
pub fn is_attached(&self) -> bool
[src]
Is this the attached swap chain?
pub fn destroy(
&self,
device: &mut Device,
context: &mut Context
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Context
) -> Result<(), Error>
Destroy the swap chain.
Called by the producer.
Returns an error if context
is not the producer context for this swap chain.
pub fn create_attached(
device: &mut Device,
context: &mut Context,
surface_provider: Box<dyn SurfaceProvider + Send>
) -> Result<SwapChain, Error>
[src]
device: &mut Device,
context: &mut Context,
surface_provider: Box<dyn SurfaceProvider + Send>
) -> Result<SwapChain, Error>
Create a new attached swap chain
pub fn create_detached(
device: &mut Device,
context: &mut Context,
surface_provider: Box<dyn SurfaceProvider + Send>,
size: Size2D<i32>
) -> Result<SwapChain, Error>
[src]
device: &mut Device,
context: &mut Context,
surface_provider: Box<dyn SurfaceProvider + Send>,
size: Size2D<i32>
) -> Result<SwapChain, Error>
Create a new detached swap chain
Trait Implementations
impl Clone for SwapChain
[src]
impl SwapChainAPI for SwapChain
[src]
type Surface = Surface
fn take_surface(&self) -> Option<Surface>
[src]
Take the current front buffer. Called by a consumer.
fn recycle_surface(&self, surface: Surface)
[src]
Recycle the current front buffer. Called by a consumer.
Auto Trait Implementations
impl RefUnwindSafe for SwapChain
impl Send for SwapChain
impl Sync for SwapChain
impl Unpin for SwapChain
impl UnwindSafe for SwapChain
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut 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>,