pub struct Backend { /* private fields */ }
Implementations§
source§impl Backend
impl Backend
sourcepub fn new(
device: &Device,
queue: &Queue,
settings: Settings,
format: TextureFormat
) -> Self
pub fn new( device: &Device, queue: &Queue, settings: Settings, format: TextureFormat ) -> Self
Creates a new Backend
.
sourcepub fn present<T: AsRef<str>>(
&mut self,
device: &Device,
queue: &Queue,
encoder: &mut CommandEncoder,
clear_color: Option<Color>,
format: TextureFormat,
frame: &TextureView,
primitives: &[Primitive],
viewport: &Viewport,
overlay_text: &[T]
)
pub fn present<T: AsRef<str>>( &mut self, device: &Device, queue: &Queue, encoder: &mut CommandEncoder, clear_color: Option<Color>, format: TextureFormat, frame: &TextureView, primitives: &[Primitive], viewport: &Viewport, overlay_text: &[T] )
Draws the provided primitives in the given TextureView
.
The text provided as overlay will be rendered on top of the primitives. This is useful for rendering debug information.
Trait Implementations§
source§impl Image for Backend
Available on crate feature image
only.
impl Image for Backend
Available on crate feature
image
only.source§fn dimensions(&self, handle: &Handle) -> Size<u32>
fn dimensions(&self, handle: &Handle) -> Size<u32>
Returns the dimensions of the provided image.
Auto Trait Implementations§
impl !RefUnwindSafe for Backend
impl !Send for Backend
impl !Sync for Backend
impl Unpin for Backend
impl !UnwindSafe for Backend
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more