pub struct GpuRenderer { /* private fields */ }Expand description
GPU描画コンテキスト
Implementations§
Source§impl GpuRenderer
impl GpuRenderer
Sourcepub fn cache_stats(&self) -> Vec<CacheStatsSnapshot>
pub fn cache_stats(&self) -> Vec<CacheStatsSnapshot>
Returns the hit/miss/eviction counters of the internal text caches (layout, glyph bearings, glyph atlas). Empty when text rendering is unavailable.
Sourcepub fn parse_draw_commands(&mut self, commands: &[DrawCommand])
pub fn parse_draw_commands(&mut self, commands: &[DrawCommand])
描画命令を解析して頂点バッファやテキストキューに登録
Sourcepub fn render(&mut self) -> Result<()>
pub fn render(&mut self) -> Result<()>
フレームを描画
TODO:
[wgpu::CurrentSurfaceTexture] をよりよく処理する必要があります。
現在は、 Success 時以外の結果を無視し、Errorにまとめて返す挙動をします。
pub fn set_scale_factor(&mut self, scale_factor: f64)
Trait Implementations§
Source§impl DrawSink for GpuRenderer
Presents through a wgpu surface bound to an OS window.
impl DrawSink for GpuRenderer
Presents through a wgpu surface bound to an OS window.
This is the shell’s default DrawSink. Callers above the seam only ever
see the trait, so the fact that presentation is tied to a window surface
stays contained here.
Source§fn upload(&mut self, commands: &[DrawCommand])
fn upload(&mut self, commands: &[DrawCommand])
Records and uploads
commands for the next frame.Source§fn resize(&mut self, size: (u32, u32))
fn resize(&mut self, size: (u32, u32))
Notifies the sink that its drawable changed size, in physical pixels.
Source§fn set_scale_factor(&mut self, scale_factor: f64)
fn set_scale_factor(&mut self, scale_factor: f64)
Notifies the sink that the display scale factor changed.
Auto Trait Implementations§
impl !Freeze for GpuRenderer
impl !RefUnwindSafe for GpuRenderer
impl !UnwindSafe for GpuRenderer
impl Send for GpuRenderer
impl Sync for GpuRenderer
impl Unpin for GpuRenderer
impl UnsafeUnpin for GpuRenderer
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more