Struct nannou::wgpu::Instance[][src]

pub struct Instance { /* fields omitted */ }
Expand description

Context for all other wgpu objects. Instance of wgpu.

This is the first thing you create when using wgpu. Its primary use is to create Adapters and Surfaces.

Does not have to be kept alive.

Implementations

Create an new instance of wgpu.

Arguments
  • backends - Controls from which backends wgpu will choose during instantiation.

Create an new instance of wgpu from a wgpu-hal instance.

Arguments
  • hal_instance - wgpu-hal instance.
Safety

Refer to the creation of wgpu-hal Instance for every backend.

Retrieves all available Adapters that match the given Backends.

Arguments
  • backends - Backends from which to enumerate adapters.

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.

Converts a wgpu-hal ExposedAdapter to a wgpu Adapter.

Safety

hal_adapter must be created from this instance internal handle.

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.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.