Struct nannou::wgpu::Device [−][src]
pub struct Device { /* fields omitted */ }
Expand description
Open connection to a graphics and/or compute device.
Responsible for the creation of most rendering and compute resources.
These are then used in commands, which are submitted to a Queue
.
A device may be requested from an adapter with Adapter::request_device
.
Implementations
Check for resource cleanups and mapping callbacks.
no-op on the web, device is automatically polled.
List all features that may be used with this device.
Functions may panic if you use unsupported features.
List all limits that were requested of this device.
If any of these limits are exceeded, functions may panic.
Creates a shader module from either SPIR-V or WGSL source code.
pub fn create_command_encoder(
&self,
desc: &CommandEncoderDescriptor<Option<&str>>
) -> CommandEncoder
pub fn create_command_encoder(
&self,
desc: &CommandEncoderDescriptor<Option<&str>>
) -> CommandEncoder
Creates an empty CommandEncoder
.
pub fn create_render_bundle_encoder(
&self,
desc: &RenderBundleEncoderDescriptor<'_>
) -> RenderBundleEncoder<'_>
pub fn create_render_bundle_encoder(
&self,
desc: &RenderBundleEncoderDescriptor<'_>
) -> RenderBundleEncoder<'_>
Creates an empty RenderBundleEncoder
.
Creates a new BindGroup
.
pub fn create_bind_group_layout(
&self,
desc: &BindGroupLayoutDescriptor<'_>
) -> BindGroupLayout
pub fn create_bind_group_layout(
&self,
desc: &BindGroupLayoutDescriptor<'_>
) -> BindGroupLayout
Creates a BindGroupLayout
.
Creates a PipelineLayout
.
Creates a RenderPipeline
.
pub fn create_compute_pipeline(
&self,
desc: &ComputePipelineDescriptor<'_>
) -> ComputePipeline
pub fn create_compute_pipeline(
&self,
desc: &ComputePipelineDescriptor<'_>
) -> ComputePipeline
Creates a ComputePipeline
.
Creates a new Texture
.
desc
specifies the general format of the texture.
Creates a new Sampler
.
desc
specifies the behavior of the sampler.
Creates a new QuerySet
.
Create a new SwapChain
which targets surface
.
Panics
- A old
SwapChainFrame
is still alive referencing an old swapchain. - Texture format requested is unsupported on the swap chain.
Set a callback for errors that are not handled in error scopes.
Starts frame capture.
Stops frame capture.
Trait Implementations
Creates a Buffer with data to initialize it.
Auto Trait Implementations
impl !RefUnwindSafe for Device
impl !UnwindSafe for Device
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
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
pub fn vzip(self) -> V