pub struct WgpuBackend { /* private fields */ }Implementations§
Source§impl WgpuBackend
impl WgpuBackend
pub async fn new_async(window: Arc<Window>) -> Result<Self>
pub fn new(window: Arc<Window>) -> Result<Self>
pub fn set_image_from_bytes( &mut self, handle: u64, data: &[u8], srgb: bool, ) -> Result<()>
pub fn set_image_rgba8( &mut self, handle: u64, w: u32, h: u32, rgba: &[u8], srgb: bool, ) -> Result<()>
pub fn set_image_nv12( &mut self, handle: u64, w: u32, h: u32, y: &[u8], uv: &[u8], full_range: bool, ) -> Result<()>
pub fn remove_image(&mut self, handle: u64)
pub fn register_image_from_bytes(&mut self, data: &[u8], srgb: bool) -> u64
Trait Implementations§
Source§impl RenderBackend for WgpuBackend
impl RenderBackend for WgpuBackend
fn configure_surface(&mut self, width: u32, height: u32)
fn frame(&mut self, scene: &Scene, _glyph_cfg: GlyphRasterConfig)
Auto Trait Implementations§
impl !Freeze for WgpuBackend
impl !RefUnwindSafe for WgpuBackend
impl Send for WgpuBackend
impl Sync for WgpuBackend
impl Unpin for WgpuBackend
impl !UnwindSafe for WgpuBackend
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.