pub trait RenderBackend {
// Required methods
fn configure_surface(&mut self, width: u32, height: u32) -> (u32, u32);
fn frame(&mut self, scene: &Scene, glyph_cfg: GlyphRasterConfig) -> bool;
}Required Methods§
Sourcefn configure_surface(&mut self, width: u32, height: u32) -> (u32, u32)
fn configure_surface(&mut self, width: u32, height: u32) -> (u32, u32)
Configure the framebuffer for width x height and return the size
actually used.
Device texture limits can make the framebuffer smaller than the viewport, so the caller must adopt the returned size for layout and hit testing. Anything else lets the scene project against one size while input is resolved against another.
fn frame(&mut self, scene: &Scene, glyph_cfg: GlyphRasterConfig) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".