pub struct WgpuRenderer { /* private fields */ }Implementations§
Source§impl WgpuRenderer
impl WgpuRenderer
Sourcepub fn new(target: TargetDescriptor) -> Result<Self, Error>
pub fn new(target: TargetDescriptor) -> Result<Self, Error>
Creates an offscreen Vulkan or Direct3D 12 renderer.
§Errors
Returns a typed target, adapter, or device creation error.
pub fn adapter(&self) -> &AdapterDescription
pub const fn metrics(&self) -> RecoveryMetrics
Sourcepub fn present_surface<'window, S>(
&mut self,
source: S,
request: &RenderRequest<'_>,
) -> Result<PresentationDescription, Error>
pub fn present_surface<'window, S>( &mut self, source: S, request: &RenderRequest<'_>, ) -> Result<PresentationDescription, Error>
Renders the same scene/material path directly into a native surface and presents it using this renderer’s existing adapter, device, and queue.
§Errors
Returns a typed target, surface, resource, or backend error. Timeout and occlusion are reported as unavailable frames; outdated surfaces are reconfigured and retried once.
Trait Implementations§
Source§impl Renderer for WgpuRenderer
impl Renderer for WgpuRenderer
fn target(&self) -> TargetDescriptor
Source§fn resize(&mut self, width: u32, height: u32) -> Result<(), Error>
fn resize(&mut self, width: u32, height: u32) -> Result<(), Error>
Changes logical target dimensions without changing target ownership. Read more
Source§fn render(&mut self, request: RenderRequest<'_>) -> Result<FrameOutput, Error>
fn render(&mut self, request: RenderRequest<'_>) -> Result<FrameOutput, Error>
Renders exactly one immutable scene revision. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for WgpuRenderer
impl !UnwindSafe for WgpuRenderer
impl Freeze for WgpuRenderer
impl Send for WgpuRenderer
impl Sync 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