pub struct WgpuRenderer { /* private fields */ }Implementations§
Source§impl WgpuRenderer
impl WgpuRenderer
pub async unsafe fn new_async( window: &(impl HasRawWindowHandle + HasRawDisplayHandle), width: u32, height: u32, ) -> Self
pub unsafe fn new( window: &(impl HasRawWindowHandle + HasRawDisplayHandle), width: u32, height: u32, ) -> Self
pub fn device(&self) -> &Device
pub fn queue(&self) -> &Queue
pub fn resize(&mut self, width: u32, height: u32)
pub fn render_frame(&mut self, frame: &Frame, clear_color: Color)
Trait Implementations§
Source§impl Renderer for WgpuRenderer
impl Renderer for WgpuRenderer
fn window_size(&self) -> Vec2
fn scale(&self) -> f32
fn create_image(&self, data: &ImageData) -> ImageHandle
fn messure_text(&self, section: &TextSection) -> Option<Rect>
fn hit_text(&self, section: &TextSection, position: Vec2) -> Option<TextHit>
Auto Trait Implementations§
impl !Freeze for WgpuRenderer
impl !RefUnwindSafe for WgpuRenderer
impl !Sync for WgpuRenderer
impl !UnwindSafe for WgpuRenderer
impl Send for WgpuRenderer
impl Unpin for WgpuRenderer
impl UnsafeUnpin for WgpuRenderer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> SendSync for T
impl<T> Sendable for T
Source§impl<T> Styleable<T> for T
impl<T> Styleable<T> for T
Source§fn styled(self) -> Styled<T>
fn styled(self) -> Styled<T>
Converts the
self into a Styled<Self> value.Source§fn attr_trans(
self,
key: &str,
value: impl Into<StyleAttributeValue>,
transition: impl Into<StyleTransition>,
) -> Styled<T>
fn attr_trans( self, key: &str, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition>, ) -> Styled<T>
Adds an attribute with a transition.