Struct vulkano::swapchain::Surface[][src]

pub struct Surface<W> { /* fields omitted */ }
Expand description

Represents a surface on the screen.

Creating a Surface is platform-specific.

Implementations

Creates a Surface given the raw handler.

Be careful when using it

Creates a Surface that covers a display mode.

Panic
  • Panics if display_mode and plane don’t belong to the same physical device.
  • Panics if plane doesn’t support the display of display_mode.

Creates a Surface from a Win32 window.

The surface’s min, max and current extent will always match the window’s dimensions.

Safety

The caller must ensure that the hinstance and the hwnd are both correct and stay alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Creates a Surface from an XCB window.

The surface’s min, max and current extent will always match the window’s dimensions.

Safety

The caller must ensure that the connection and the window are both correct and stay alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Creates a Surface from an Xlib window.

The surface’s min, max and current extent will always match the window’s dimensions.

Safety

The caller must ensure that the display and the window are both correct and stay alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Creates a Surface from a Wayland window.

The window’s dimensions will be set to the size of the swapchain.

Safety

The caller must ensure that the display and the surface are both correct and stay alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Creates a Surface from an Android window.

Safety

The caller must ensure that the window is correct and stays alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Creates a Surface from an iOS UIView.

Safety
  • The caller must ensure that the view is correct and stays alive for the entire lifetime of the surface. The win parameter can be used to ensure this.
  • The UIView must be backed by a CALayer instance of type CAMetalLayer.

Creates a Surface from a MacOS NSView.

Safety
  • The caller must ensure that the view is correct and stays alive for the entire lifetime of the surface. The win parameter can be used to ensure this.
  • The NSView must be backed by a CALayer instance of type CAMetalLayer.

Creates a Surface from a CAMetalLayer.

Safety
  • The caller must ensure that the layer is correct and stays alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Creates a Surface from a code:nn::code:vi::code:Layer.

Safety

The caller must ensure that the window is correct and stays alive for the entire lifetime of the surface. The win parameter can be used to ensure this.

Returns true if the given queue family can draw on this surface.

Retrieves the capabilities of a surface when used by a certain device.

Notes
  • Capabilities that are not supported in vk-sys are silently dropped
Panic
  • Panics if the device and the surface don’t belong to the same instance.

Returns the instance this surface was created with.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

The type of the object.

Returns a reference to the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Builds a pointer to this type from a raw pointer.

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

Returns the size of an individual element.

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.