[−][src]Struct gaclen::graphics::swapchain::Swapchain
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]
context: &Context,
device: &Device,
window: Arc<Window>,
present_mode: PresentMode,
depth_format: Format
) -> Result<Swapchain, SwapchainCreationError>
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]
&self,
frame: &Frame
) -> Arc<SwapchainImage<Arc<Window>>>
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
impl !RefUnwindSafe for Swapchain
impl Send for Swapchain
impl Sync for Swapchain
impl Unpin for Swapchain
impl !UnwindSafe for Swapchain
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> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[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> SafeBorrow<T> for 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>,