[][src]Struct surfman_chains::SwapChain

pub struct SwapChain(_);

A thread-safe swap chain.

Methods

impl SwapChain[src]

pub fn swap_buffers(
    &self,
    device: &mut Device,
    context: &mut Context
) -> Result<(), Error>
[src]

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]

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]

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 clear_surface(
    &self,
    device: &mut Device,
    context: &mut Context,
    gl: &Gl
) -> Result<(), Error>
[src]

pub fn take_surface(&self) -> Option<Surface>[src]

Take the current front buffer. Called by a consumer.

pub fn recycle_surface(&self, surface: Surface)[src]

Recycle the current front buffer. Called by a consumer.

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]

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_access: SurfaceAccess
) -> Result<SwapChain, Error>
[src]

Create a new attached swap chain

pub fn create_detached(
    device: &mut Device,
    context: &mut Context,
    surface_access: SurfaceAccess,
    size: Size2D<i32>
) -> Result<SwapChain, Error>
[src]

Create a new detached swap chain

Trait Implementations

impl Clone for SwapChain[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]