Struct wgpu::Instance [−][src]
pub struct Instance { /* fields omitted */ }
Expand description
Implementations
Retrieves all available Adapter
s that match the given BackendBit
.
Arguments
backends
- Backends from which to enumerate adapters.
pub fn request_adapter(
&self,
options: &RequestAdapterOptions<'_>
) -> impl Future<Output = Option<Adapter>> + Send
pub fn request_adapter(
&self,
options: &RequestAdapterOptions<'_>
) -> impl Future<Output = Option<Adapter>> + Send
Retrieves an Adapter
which matches the given RequestAdapterOptions
.
Some options are “soft”, so treated as non-mandatory. Others are “hard”.
If no adapters are found that suffice all the “hard” options, None
is returned.
Creates a surface from a raw window handle.
Safety
- Raw Window Handle must be a valid object to create a surface upon.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Instance
impl !UnwindSafe for Instance