Skip to main content

RenderTarget

Trait RenderTarget 

Source
pub trait RenderTarget:
    HasWindowHandle
    + HasDisplayHandle
    + Send
    + Sync
    + 'static {
    // Required method
    fn physical_size(&self) -> (u32, u32);
}
Expand description

A live OS window a Renderer presents into.

The window backend owns the window and shares it as an Arc<dyn RenderTarget>. The renderer keeps that handle for as long as it holds a surface, so the window outlives every GPU object bound to it. The two handle traits are the platform-neutral vocabulary every desktop graphics API already speaks.

Required Methods§

Source

fn physical_size(&self) -> (u32, u32)

Drawable size in physical pixels.

Implementors§