[−][src]Struct surfman_chains::SwapChain
A thread-safe swap chain.
Implementations
impl<Device: DeviceAPI> SwapChain<Device>
[src]
pub fn swap_buffers(
&self,
device: &mut Device,
context: &mut Device::Context,
preserve_buffer: PreserveBuffer
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Device::Context,
preserve_buffer: PreserveBuffer
) -> 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 Device::Context,
other: &SwapChain<Device>
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Device::Context,
other: &SwapChain<Device>
) -> 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 Device::Context,
size: Size2D<i32>
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Device::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 take_surface_texture(
&self,
device: &Device,
context: &mut Device::Context
) -> Result<Device::SurfaceTexture, Error>
[src]
&self,
device: &Device,
context: &mut Device::Context
) -> Result<Device::SurfaceTexture, Error>
pub fn recycle_surface_texture(
&self,
device: &Device,
context: &mut Device::Context,
surface_texture: Device::SurfaceTexture
) -> Result<(), Error>
[src]
&self,
device: &Device,
context: &mut Device::Context,
surface_texture: Device::SurfaceTexture
) -> Result<(), Error>
pub fn clear_surface(
&self,
device: &mut Device,
context: &mut Device::Context,
gl: &Gl,
color: [f32; 4]
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Device::Context,
gl: &Gl,
color: [f32; 4]
) -> Result<(), Error>
pub fn is_attached(&self) -> bool
[src]
Is this the attached swap chain?
pub fn destroy(
&self,
device: &mut Device,
context: &mut Device::Context
) -> Result<(), Error>
[src]
&self,
device: &mut Device,
context: &mut Device::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 Device::Context,
surface_access: SurfaceAccess
) -> Result<SwapChain<Device>, Error>
[src]
device: &mut Device,
context: &mut Device::Context,
surface_access: SurfaceAccess
) -> Result<SwapChain<Device>, Error>
Create a new attached swap chain
pub fn create_detached(
device: &mut Device,
context: &mut Device::Context,
surface_access: SurfaceAccess,
size: Size2D<i32>
) -> Result<SwapChain<Device>, Error>
[src]
device: &mut Device,
context: &mut Device::Context,
surface_access: SurfaceAccess,
size: Size2D<i32>
) -> Result<SwapChain<Device>, Error>
Create a new detached swap chain
Trait Implementations
impl<Device: DeviceAPI> Clone for SwapChain<Device>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Device> SwapChainAPI for SwapChain<Device> where
Device: 'static + DeviceAPI,
Device::Surface: Send,
[src]
Device: 'static + DeviceAPI,
Device::Surface: Send,
type Surface = Device::Surface
fn take_surface(&self) -> Option<Device::Surface>
[src]
Take the current front buffer. Called by a consumer.
fn recycle_surface(&self, surface: Device::Surface)
[src]
Recycle the current front buffer. Called by a consumer.
Auto Trait Implementations
impl<Device> RefUnwindSafe for SwapChain<Device>
impl<Device> Send for SwapChain<Device> where
<Device as Device>::Surface: Send,
<Device as Device>::Surface: Send,
impl<Device> Sync for SwapChain<Device> where
<Device as Device>::Surface: Send,
<Device as Device>::Surface: Send,
impl<Device> Unpin for SwapChain<Device>
impl<Device> UnwindSafe for SwapChain<Device>
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>,