pub struct GPUBackend {
pub backend_type: BackendType,
pub device: Option<Arc<Device>>,
pub queue: Option<Arc<Queue>>,
pub surface: Option<Surface<'static>>,
pub config: Option<SurfaceConfiguration>,
}Expand description
GPU backend abstraction - OPTIONAL helper for web contexts
This struct is maintained for backward compatibility and web-based usage. For native window rendering (e.g., Python bindings), renderers can be created directly with device/queue/config without going through GPUBackend.
Design rationale:
- Native contexts: Create device/queue/surface directly, pass to renderer
- Web contexts: Use GPUBackend as a convenient factory/manager
Fields§
§backend_type: BackendType§device: Option<Arc<Device>>§queue: Option<Arc<Queue>>§surface: Option<Surface<'static>>§config: Option<SurfaceConfiguration>Implementations§
Source§impl GPUBackend
impl GPUBackend
Auto Trait Implementations§
impl !Freeze for GPUBackend
impl !RefUnwindSafe for GPUBackend
impl Send for GPUBackend
impl Sync for GPUBackend
impl Unpin for GPUBackend
impl !UnwindSafe for GPUBackend
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