Trait gfx_core::Surface [−][src]
pub trait Surface {
type CommandQueue: CommandQueue;
type SwapChain: SwapChain;
type Window;
fn from_window(window: &Self::Window) -> Self;
fn build_swapchain<T: RenderFormat>(
&self,
present_queue: &Self::CommandQueue
) -> Self::SwapChain;
}A Surface abstracts the surface of a native window, which will be presented
Associated Types
type CommandQueue: CommandQueue
Associated CommandQueue type.
type SwapChain: SwapChain
Associated SwapChain type.
type Window
Associated native Window type.
Required Methods
fn from_window(window: &Self::Window) -> Self
Create a new surface from a native window.
fn build_swapchain<T: RenderFormat>(
&self,
present_queue: &Self::CommandQueue
) -> Self::SwapChain
&self,
present_queue: &Self::CommandQueue
) -> Self::SwapChain
Create a new swapchain from the current surface with an associated present queue.