Struct wgpu::Instance [−][src]
pub struct Instance { /* fields omitted */ }
Expand description
Implementations
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.
pub unsafe fn create_adapter_from_hal<A: HalApi>(
&self,
hal_adapter: ExposedAdapter<A>
) -> Adapter
pub unsafe fn create_adapter_from_hal<A: HalApi>(
&self,
hal_adapter: ExposedAdapter<A>
) -> Adapter
Creates a surface from a raw window handle.
Safety
- Raw Window Handle must be a valid object to create a surface upon and must remain valid for the lifetime of the returned surface.
Polls all devices.
If force_wait
is true and this is not running on the web,
then this function will block until all in-flight buffers have been mapped.
Generates memory report.