Surface

Trait Surface 

Source
pub trait Surface: 'static {
    type DisplayList: DisplayList;

    // Required methods
    fn draw(
        &mut self,
        display_list: &Self::DisplayList,
    ) -> Result<(), &'static str>;
    fn present(self) -> Result<(), &'static str>;
}
Expand description

A surface represents a render target. That can be usually a window or a texture.

Required Associated Types§

Required Methods§

Source

fn draw(&mut self, display_list: &Self::DisplayList) -> Result<(), &'static str>

Draws a display list on the surface.

Source

fn present(self) -> Result<(), &'static str>

Present the surface to the underlying window system (for Vulkan).

Implementors§