Struct vulkano::swapchain::Swapchain[][src]

pub struct Swapchain<W> { /* fields omitted */ }

Contains the swapping system and the images that can be shown on a surface.

Implementations

impl<W> Swapchain<W>[src]

pub fn start(
    device: Arc<Device>,
    surface: Arc<Surface<W>>
) -> SwapchainBuilder<W>
[src]

Starts the process of building a new swapchain, using default values for the parameters.

pub fn recreate(self: &Arc<Self>) -> SwapchainBuilder<W>[src]

Starts building a new swapchain from an existing swapchain.

Use this when a swapchain has become invalidated, such as due to window resizes. The builder is pre-filled with the parameters of the old one, except for dimensions, which is set to None.

pub fn surface(&self) -> &Arc<Surface<W>>[src]

Returns the saved Surface, from the Swapchain creation.

pub fn raw_image(&self, offset: usize) -> Option<ImageInner<'_>>[src]

Returns of the images that belong to this swapchain.

pub fn num_images(&self) -> u32[src]

Returns the number of images of the swapchain.

pub fn format(&self) -> Format[src]

Returns the format of the images of the swapchain.

pub fn dimensions(&self) -> [u32; 2][src]

Returns the dimensions of the images of the swapchain.

pub fn layers(&self) -> u32[src]

Returns the number of layers of the images of the swapchain.

pub fn transform(&self) -> SurfaceTransform[src]

Returns the transform that was passed when creating the swapchain.

pub fn composite_alpha(&self) -> CompositeAlpha[src]

Returns the alpha mode that was passed when creating the swapchain.

pub fn present_mode(&self) -> PresentMode[src]

Returns the present mode that was passed when creating the swapchain.

pub fn clipped(&self) -> bool[src]

Returns the value of clipped that was passed when creating the swapchain.

pub fn fullscreen_exclusive(&self) -> FullscreenExclusive[src]

Returns the value of ’fullscreen_exclusive` that was passed when creating the swapchain.

pub fn acquire_fullscreen_exclusive(
    &self
) -> Result<(), FullscreenExclusiveError>
[src]

FullscreenExclusive::AppControlled must be the active fullscreen exclusivity mode. Acquire fullscreen exclusivity until either the release_fullscreen_exclusive is called, or if any of the the other Swapchain functions return FullscreenExclusiveLost. Requires: FullscreenExclusive::AppControlled

pub fn release_fullscreen_exclusive(
    &self
) -> Result<(), FullscreenExclusiveError>
[src]

FullscreenExclusive::AppControlled must be the active fullscreen exclusivity mode. Release fullscreen exclusivity.

pub fn is_fullscreen_exclusive(&self) -> bool[src]

FullscreenExclusive::AppControlled is not the active fullscreen exclusivity mode, then this function will always return false. If true is returned the swapchain is in FullscreenExclusive::AppControlled fullscreen exclusivity mode and exclusivity is currently acquired.

Trait Implementations

impl<W> Debug for Swapchain<W>[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<W> DeviceOwned for Swapchain<W>[src]

fn device(&self) -> &Arc<Device>[src]

Returns the device that owns Self.

impl<W> Drop for Swapchain<W>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl<W> VulkanObject for Swapchain<W>[src]

type Object = SwapchainKHR

The type of the object.

const TYPE: ObjectType[src]

The ObjectType of the internal Vulkan handle.

fn internal_object(&self) -> SwapchainKHR[src]

Returns a reference to the object.

Auto Trait Implementations

impl<W> RefUnwindSafe for Swapchain<W> where
    W: RefUnwindSafe

impl<W> Send for Swapchain<W> where
    W: Send + Sync

impl<W> Sync for Swapchain<W> where
    W: Send + Sync

impl<W> Unpin for Swapchain<W>

impl<W> UnwindSafe for Swapchain<W> where
    W: RefUnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Content for T[src]

pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>[src]

Builds a pointer to this type from a raw pointer.

pub fn is_size_suitable(usize) -> bool[src]

Returns true if the size is suitable to store a type like this.

pub fn indiv_size() -> usize[src]

Returns the size of an individual element.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.