pub struct NativeGpuDriver { /* private fields */ }Expand description
Physical OS GPU driver wrapping Metal, D3D12, Vulkan, or WebGL2 with automatic recording fallback.
Implementations§
Source§impl NativeGpuDriver
Construction helpers for NativeGpuDriver.
impl NativeGpuDriver
Construction helpers for NativeGpuDriver.
Sourcepub fn probe(backend: GraphicsBackend) -> Self
pub fn probe(backend: GraphicsBackend) -> Self
Sourcepub fn switch_backend(&mut self, backend: GraphicsBackend)
pub fn switch_backend(&mut self, backend: GraphicsBackend)
Re-initializes the GPU driver for backend, releasing any previously retained OS handles.
§Arguments
&Self- Mutable GPU driver.GraphicsBackend- Target graphics backend.
Source§impl NativeGpuDriver
impl NativeGpuDriver
pub fn get_adapter(&self) -> &GpuAdapterInfo
pub fn get_device_handle(&self) -> usize
pub fn get_queue_handle(&self) -> usize
pub fn get_library_handle(&self) -> usize
pub fn get_submitted_frames(&self) -> u64
pub fn get_uploaded_instances(&self) -> u64
pub fn get_fallback(&self) -> &RecordingGpuDriver
Trait Implementations§
Source§impl Debug for NativeGpuDriver
impl Debug for NativeGpuDriver
Source§impl Default for NativeGpuDriver
Default NativeGpuDriver targets headless recording fallback.
impl Default for NativeGpuDriver
Default NativeGpuDriver targets headless recording fallback.
Source§impl Drop for NativeGpuDriver
Automatic native GPU handle cleanup when NativeGpuDriver is dropped.
impl Drop for NativeGpuDriver
Automatic native GPU handle cleanup when NativeGpuDriver is dropped.
Source§impl GpuDriver for NativeGpuDriver
GpuDriver implementation uploading instanced quad buffers to the active physical OS GPU.
impl GpuDriver for NativeGpuDriver
GpuDriver implementation uploading instanced quad buffers to the active physical OS GPU.
Source§fn backend(&self) -> GraphicsBackend
fn backend(&self) -> GraphicsBackend
Source§fn shader_source(&self) -> &'static str
fn shader_source(&self) -> &'static str
Source§fn submit_batches(
&mut self,
width: u32,
height: u32,
clear_color: Color,
batches: &[GpuBatch],
) -> Result<usize, PlatformError>
fn submit_batches( &mut self, width: u32, height: u32, clear_color: Color, batches: &[GpuBatch], ) -> Result<usize, PlatformError>
Auto Trait Implementations§
impl Forget for NativeGpuDriver
impl Freeze for NativeGpuDriver
impl Move for NativeGpuDriver
impl RefUnwindSafe for NativeGpuDriver
impl Send for NativeGpuDriver
impl Sync for NativeGpuDriver
impl Unpin for NativeGpuDriver
impl UnsafeUnpin for NativeGpuDriver
impl UnwindSafe for NativeGpuDriver
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