struct SwapChainData<Device: DeviceAPI> {
    size: Size2D<i32>,
    context_id: ContextID,
    surface_access: SurfaceAccess,
    back_buffer: BackBuffer<Device>,
    pending_surface: Option<Device::Surface>,
    recycled_surfaces: Vec<Device::Surface>,
}

Fields§

§size: Size2D<i32>§context_id: ContextID§surface_access: SurfaceAccess§back_buffer: BackBuffer<Device>§pending_surface: Option<Device::Surface>§recycled_surfaces: Vec<Device::Surface>

Implementations§

source§

impl<Device: DeviceAPI> SwapChainData<Device>

source

fn validate_context( &self, device: &Device, context: &Device::Context ) -> Result<(), Error>

source

fn swap_buffers( &mut self, device: &mut Device, context: &mut Device::Context, preserve_buffer: PreserveBuffer<'_> ) -> Result<(), Error>

source

fn take_attachment_from( &mut self, device: &mut Device, context: &mut Device::Context, other: &mut SwapChainData<Device> ) -> Result<(), Error>

source

fn resize( &mut self, device: &mut Device, context: &mut Device::Context, size: Size2D<i32> ) -> Result<(), Error>

source

fn size(&self) -> Size2D<i32>

source

fn take_surface_texture( &mut self, device: &Device, context: &mut Device::Context ) -> Result<Device::SurfaceTexture, Error>

source

fn recycle_surface_texture( &mut self, device: &Device, context: &mut Device::Context, surface_texture: Device::SurfaceTexture ) -> Result<(), Error>

source

fn take_surface(&mut self) -> Option<Device::Surface>

source

fn take_pending_surface(&mut self) -> Option<Device::Surface>

source

fn recycle_surface(&mut self, surface: Device::Surface)

source

fn clear_surface( &mut self, device: &mut Device, context: &mut Device::Context, gl: &Gl, color: [f32; 4] ) -> Result<(), Error>

source

fn is_attached(&self) -> bool

Is this the attached swap chain?

source

fn destroy( &mut self, device: &mut Device, context: &mut Device::Context ) -> Result<(), Error>

Auto Trait Implementations§

§

impl<Device> RefUnwindSafe for SwapChainData<Device>where <Device as Device>::Surface: RefUnwindSafe,

§

impl<Device> Send for SwapChainData<Device>where <Device as Device>::Surface: Send,

§

impl<Device> Sync for SwapChainData<Device>where <Device as Device>::Surface: Sync,

§

impl<Device> Unpin for SwapChainData<Device>where <Device as Device>::Surface: Unpin,

§

impl<Device> UnwindSafe for SwapChainData<Device>where <Device as Device>::Surface: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.