[][src]Struct gaclen::graphics::swapchain::Swapchain

pub struct Swapchain { /* fields omitted */ }

Swapchain is the infrastructure for drawing on the screen.

It includes the front and back buffers that are presented on the screen.

Methods

impl Swapchain[src]

pub fn new(
    context: &Context,
    device: &Device,
    window: Arc<Window>,
    present_mode: PresentMode,
    depth_format: Format
) -> Result<Swapchain, SwapchainCreationError>
[src]

Create a new Swapchain using provided Device.

pub fn inverse_depth(&mut self, inverse: bool)[src]

Set the depth buffer to use forward (inverse == false) or inverse range.

Forward range is 0.0 being the front and the 1.0 being the away. Inverse range is 1.0 the front and 0.0 being the away. The advantages of different approaches are to be researched by the reader.

pub fn resize(&mut self, dimensions: (u32, u32)) -> Result<(), ResizeError>[src]

Resize the images in the swapchain to provided size.

pub fn get_color_image_for(
    &self,
    frame: &Frame
) -> Arc<SwapchainImage<Arc<Window>>>
[src]

Get the target image to draw to for provided frame.

pub fn get_depth_image_for(&self, frame: &Frame) -> Arc<AttachmentImage>[src]

Get the target depth image to draw to for provided frame.

pub fn default_viewport(&self) -> Viewport[src]

Get the default viewport for rendering to this swapchain.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Content for T[src]

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

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

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

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.