pub struct HostWgpuContext {
pub device: Device,
pub queue: Queue,
pub backend: InteropBackend,
}Expand description
Wraps a wgpu::Device and wgpu::Queue together with the detected backend.
Pass one of these to WgpuTextureImporter::new or directly to the
platform-specific import functions.
Fields§
§device: DeviceThe wgpu device that will own imported textures.
queue: QueueThe queue associated with device.
backend: InteropBackendThe graphics backend detected on device at construction time.
Implementations§
Source§impl HostWgpuContext
impl HostWgpuContext
pub fn new(device: Device, queue: Queue) -> Self
pub fn capabilities(&self) -> CapabilityMatrix
Trait Implementations§
Source§impl Clone for HostWgpuContext
impl Clone for HostWgpuContext
Auto Trait Implementations§
impl !RefUnwindSafe for HostWgpuContext
impl !UnwindSafe for HostWgpuContext
impl Freeze for HostWgpuContext
impl Send for HostWgpuContext
impl Sync for HostWgpuContext
impl Unpin for HostWgpuContext
impl UnsafeUnpin for HostWgpuContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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